26 February 2018, 11:19 | #121 | |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Quote:
But it means I can now interact with intuition... the first thing you notice is the corruption when the window is blitted around the screen, clearly my blitter code is still not right, and my guess is that is causing the chipram errors, thus when the program code is put into slow mem it is no longer being corrupted... I can't really think what could be wrong with my blitter though... [ Show youtube player ] Last edited by bloodline; 26 February 2018 at 11:27. |
|
26 February 2018, 11:28 | #122 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
Amazing progress!
|
26 February 2018, 13:13 | #123 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Accidentally discovered that screen dragging works
I didn't do anything to make it work... I guess that confirms my Copper is working as it should Still can't get the corruption fixed... I'm probably going to rewrite my memory handling section see if I can improve it, get rid of all these weird memory errors (I wonder if the host CPU cache might be screwing with this?) [ Show youtube player ] Last edited by bloodline; 26 February 2018 at 13:39. |
26 February 2018, 20:29 | #124 |
Registered User
Join Date: Apr 2017
Location: France
Posts: 644
|
This is exciting and amazing
I'm curious to know how fast the emulated 68000 is running. I'm impatient to view benchmarks when you will be able to run programmes. |
26 February 2018, 21:34 | #125 |
Bane of Magic
Join Date: Nov 2005
Location: Bradford, UK
Age: 38
Posts: 335
|
If it's emulating a plain a500 then i imagine it should be around the same speed as that when the benchmarks drop I'm just happy that this kind of development is happening
|
27 February 2018, 09:39 | #126 |
\m/
Join Date: Nov 2008
Location: Devon, U.K.
Posts: 573
|
Could you upload the latest binary for Debian? For those following at home. Cheers
|
27 February 2018, 12:20 | #127 | ||
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Issue log
I'm still fighting this memory corruption... only three things are able to write to chipram; the CPU, the Blitter, and the Floppy DMA. I've confirmed the Blitter and the Floppy DMA are only able to access the first 2meg of ram. So my only guess now, is that some code in Kickstart is relying on the side effects of the Amiga's incomplete address decoding. Currently I catch known address bases; ROM space, Chipregs, Slow ram (I optionally shadow the chipregs in this space, to activate and deactivate slow ram), CIAs and then any address below the CIAs is just assumed to be chipram. Any address which isn't caught is just treated as ram (the entire 24bit space is backed with a 16meg memory allocation). This naïve model is probably just too simple and some code may have some stray high bits which would normally be ignored by a real Amiga as they don't address any real hardware. Nothing short of a complete rewrite of my memory system will fix this... so I will work on that over the next week or so, unless someone has a better idea of what might be wrong. There are clues to the memory errors, notice the graphics corruption always occurs in vertical strips usually about a word in width... this is why I think it might be caused by stray high bits in addresses. Quote:
-edit- no promises, but I will try and get a windows build too. Quote:
Things to remember are that only memory accesses within the 24bit address space are byte swapped, and memory access in the top 32bit address space are platform native endian (which is almost certainly little endian now). If your code relies on the 68k being big endian, then you need to use memory allocated within the 24bit address space (first 16Meg). The goal of my current project is to keep the Amiga emulation part as simple as possible, the whole thing is in plain C and depends on no external libraries. I currently have a single function, called once every frame which uses SDL to output the frame buffer and get some user input. Last edited by bloodline; 27 February 2018 at 16:47. |
||
27 February 2018, 13:09 | #128 | |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,635
|
Quote:
By the way, did you try taking a look at the kickstart rom for the Macrosystem Draco? It is basically what you're talking about (an 68000 computer running amiga os without the amiga custom chips). |
|
27 February 2018, 14:42 | #129 | ||
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Quote:
Once I have it working with Kickstart 3.0, then I will simply use the IDE to boot it. I have an idea to split this into two projects in future, I am focusing on the original idea for now... bare minimum to get it booting, but I also want to try for a lightweight SDL based A500 emulator (using what I have developed so far, but probably won't need l for the original idea). Nothing is ever going to come close to WinUAE in terms of Amiga emulation, but I'm having a lot of fun trying to get this to work. Quote:
|
||
27 February 2018, 14:52 | #130 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,546
|
I still think problem most likely is in blitter emulation.
Do you handle descending mode correctly? (it is not same as -(an) vs (an)+ CPU addressing modes). Do you load sources twice before first destination write? (Blitter pipeline emulation). Do you keep register contents between blits? (You originally said you didn't. It will cause issues, sooner or later) |
27 February 2018, 15:05 | #131 | ||
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Quote:
I saw this in the HRM: Code:
NOTE: ----- This differs from predecrement versus postincrement in the 680x0, where an address register would be initialized to point to the word after the last, rather than the last word. -edit- I don't emulate the blitter pipeline at all, as soon as the bltsize register is filled (and the DMA is enabled) the blit is performed immediately. for each word the sequence is The sequence is: Load Source A. Decrement pointer A. Load Source B. Decrement pointer B. Shift A (using previous A value). Shift B (using previous B value). Store (unshifted) A Value for next shift operation. Store (unshifted) B Value for next shift operation Load Source C. Decrement pointer C. if first word FW Mask A. if last word, LW MASK A D = logicFunction(minterm,A,B,C) Set Zero flag if D = 0. Store D value. Decrement pointer D. Quote:
Last edited by bloodline; 27 February 2018 at 15:56. |
||
27 February 2018, 16:26 | #132 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Found a problem with the Blitter (after Toni suggested I look into it)...
It wasn't the descend mode... it was my FW/LW masking which needs to happen BEFORE the shifting... not after. This has corrected most of the corruption issues... but some (very occasional, difficult to reproduce) corruption still occurs... and I'm still getting the Green screen memory errors during boot, and the disk image is still not validating... Something is still not right. -Edit- Toni, do you think the problem could be related to the early completion of the blits? I have assumed that my blitter works the same as WinUAE's immediate blitter mode, in as much as it returns immediately, and sets the interrupt as soon as the bltsize reg is loaded. Last edited by bloodline; 27 February 2018 at 20:51. |
28 February 2018, 11:03 | #133 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
This morning before work, I was setting up my Debian box to make a fresh build and while copying over the sources, I noticed an error in my floppy code.
My cylinder buffer wrapped around at 6334 words, correcting this to 6333 means that the floppy is loaded correctly, but now since the disk loads fine, intuition doesn't come up and the earlier memory errors appear to be halting the boot. Summary: This week there have been three discrete problems, the blitter code was faulty (Thanks to Toni for sugesting that it wasn't working correctly), The floppy drive has been trying to load in an extra word (a word of 0x0000 at the end of the track, when the MFM decoder expects the last word to be 0xAAAA) but due to that error I was able to test see the emulator booting to intuition so it was really quite fortuitous. Finally, we have the memory errors... this seem to be halting the boot. When I next have a chance, I will rewrite the memory handling code. |
28 February 2018, 21:03 | #134 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
A Debian x86 build.
The q key forces a reset. The a key "inserts" the floppy disk loaded via the command line The z key runs a memory test. Last edited by bloodline; 28 February 2018 at 22:37. |
28 February 2018, 21:59 | #135 | |
BoingBagged
Join Date: Aug 2007
Location: The South of nowhere
Age: 46
Posts: 2,358
|
Quote:
As far as I understand this rom only patches an original A3000 v40.68 kickstart at boot time. Your project looks promising. |
|
28 February 2018, 22:05 | #136 | |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Quote:
-edit- ignore me, I've figured it out thanks for the rom, I'll see what I can do with it. Last edited by bloodline; 28 February 2018 at 22:41. |
|
01 March 2018, 15:18 | #137 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
So I have rewritten the memory handling functions. The new functions don't decode the 24bit addresses properly, and this creates "echoes" of the custom chips registers in the address space above 0xC00000, and also any address in the lower 2meg space now wraps around if I have configured less than 2meg.
This has resolved the memory errors. My default configuration now is with 1meg of chipram and no slow or fast ram. Ok after struggling with Visual Studio... and failing I have finally managed to get this project compiling on Windows with MinGW. Attached is a v0.1 build for Mac, Debian 64bit, and Windows 32bit. [ Show youtube player ] q key resets. a key "inserts floppy" z key, makes the disk valid (don't press this until the OS complains the disk isn't valid, I have intentionally introduced the disk error so intuition is brought up early). Please test and let me know how you get on. Currently the disk loading seems to get to track 106 and then gives up... No idea why yet. Any ideas what to look for would be great, my guess is that the OS is waiting for some part of the hardware to respond... but what? Last edited by bloodline; 01 March 2018 at 15:39. |
01 March 2018, 15:56 | #138 |
Registered User
Join Date: Aug 2016
Location: Cresco, PA, USA
Age: 53
Posts: 1,126
|
I get an error - SDL2.dll not found on Windows. clicking OK closes the emulation.
I googled and found this - https://stackoverflow.com/questions/...l2-dll-missing I put the 32 and 64 bit version in the correct folder then ran WinZorro again and received another error. the application was unable to start correctly (0xc000007b) Click OK to close. I'm on x64 Win10 Pro. EDIT: I ran in compatibility mode for Windows XP SP3 and received the same error about not starting correctly. Last edited by Sinphaltimus; 01 March 2018 at 15:57. Reason: see edit note above. |
01 March 2018, 16:01 | #139 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
I don't have a Windows machine here, so I had to build it in VirtualBox using a discarded Windows7 DVD from work... Sadly that error is rather unhelpful... I'm not sure how else I can proceed with windows builds.
|
01 March 2018, 16:07 | #140 |
Registered User
Join Date: Aug 2016
Location: Cresco, PA, USA
Age: 53
Posts: 1,126
|
Yeah, I'm not much help beyond that. Sorry. But thanks for giving it a go. Been following this since the first posting and am very excited for you. You'll get there, seems you have all the support you need to help get through whatever challenges are ahead.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Amiga emulator for iOS | steviebwoy | support.OtherUAE | 35 | 15 November 2014 10:14 |
Amiga emulator for a PSP? | Vars191 | support.OtherUAE | 1 | 09 May 2010 02:08 |
Frederic's Emulator inside and Emulator thread | Fred the Fop | Retrogaming General Discussion | 22 | 09 March 2006 07:31 |
ADF Files -> Amiga(amiga with dos Emulator) | Schattenmeister | support.Hardware | 8 | 14 October 2003 00:10 |
Which Amiga emulator is best? | Tim Janssen | Amiga scene | 45 | 15 February 2002 19:52 |
|
|