![]() |
![]() |
#341 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
It seems some of my problems might be due to incorrect initial register states.
The CIA registers are now initialised correctly… But the chipset registers are not, having them all start at zero leads to the “insert disk” drawing code just filling up the chipram using the Blitter, having all the registers start at 0xFFFF, mean the code seems to complete its blitting, but still never set up a vaild copper list. The code must be depending upon some initial value in a register… not one of the read registers as those have always been initialised, and the code seems to set up the Blitter registers correct… so it must be something else ![]() |
![]() |
![]() |
#342 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,201
|
Have you tried KS1.3? KS1.2 has quite of bit off odd stuff, e.g. it will not work unless you emulate BPLCON0.ERSY to some degree (it uses it to detect if genlock is active, quick hack is to just return fixed position for VPOSR/VHPOSR if it's enabled), and IIRC the last part isn't necessary for later versions.
|
![]() |
![]() |
#343 | |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Quote:
Currently, 1.2 and 1.3 behave identically (I can see the blitter activity line drawing and filling the insert disk screen, but never set up the copper list with the correct BLP pointers), and 2.0 and 3.1 both hang during... or just after the floppy detection. The ERSY bit is set during boot... let me try your hack and hold the V/VHPOS registers. -Edit- The Kickstart just clears the bit early on and the counters restart... The problem remains ![]() Last edited by bloodline; 08 April 2022 at 21:29. |
|
![]() |
![]() |
#344 | |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Quote:
|
|
![]() |
![]() |
#345 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Source code can be found here... This is just a snapshot of the sate as of now and is just for info.
https://github.com/h5n1xp/Omega/tree/master/Omega2 For those playing along at home, this will compile when linked against libSDL2.0 -Edit- The latest DiagROM boots and runs perfectly, except for the "RGB Test", but I have no idea what that is actually supposed to be doing ![]() Last edited by bloodline; 08 April 2022 at 23:22. |
![]() |
![]() |
#346 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Found a bug, BLTFWM was being updated with BLTALWM’s value
![]() ![]() -edit- curiously DiagROMs Blitter test doesn’t work correctly now ![]() -edit- no, that’s not the change which broke that. ![]() Tonight’s debugging session is going to be fun… Last edited by bloodline; 10 April 2022 at 09:10. |
![]() |
![]() |
#347 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,637
|
|
![]() |
![]() |
#348 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Stepping through the kickstart 1.2 code, I'm struggling with this...
A0 = 0xDFF000 Code:
E fc6d04: 4df9 00bf d000 : lea $bfd000.l, A6 E fc6d0a: 022e 007f 0f00 : andi.b #$7f, ($f00,A6) E fc6d10: 4280 : clr.l D0 E fc6d12: 1d40 0a00 : move.b D0, ($a00,A6) E fc6d16: 1d40 0900 : move.b D0, ($900,A6) E fc6d1a: 1d68 0006 0800 : move.b ($6,A0), ($800,A6) |
![]() |
![]() |
#349 | |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,201
|
Quote:
CIAB TOD is the "horizontal sync event counter", i.e. it counts raster lines. So that code is setting the counter value to (more or less) match the vertical position so a CIAB TOD alarm can be used to match a (more or less) exact vertical position later on. |
|
![]() |
![]() |
#350 | |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Quote:
Yep, that was what I was missing, I'm over focusing on this issue so much I'm becoming blind to basic things. I've put my ADF track to MFM track code into the Emulator now, so at some point* I'll just abandon the hunt for this elusive bug (it's probably a timing issue... though I haven't ruled out a problem with how my CIAs behave) and see what happens if I just let the emulator boot a disk. *I'm on child care duty this week so, don't have much time for my hobbies. |
|
![]() |
![]() |
#351 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
So the past two weeks of bug hunting, turned out to be a simple typo. When the COPJMP2 register was strobed, the Copper’s PC was loaded with COP1LOC
![]() Now that’s fixed, the new code all seems to work and Kickstart 1.x can boot floppies fine. Time to look at Sprites… the original Omega didn’t really bother and just rendered the sprite data on the framebuffer after the screen draw. This time I want to generate them properly as part of the display. |
![]() |
![]() |
#352 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
It didn't take long to remind me why I don't like sprites...
The SPRxPOS register doesn't seem to be updating.. but the mouse movement is being correctly recorded, DPaint4 works fine, for example... |
![]() |
![]() |
#353 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,637
|
What did you mean, when you say "not updating"? SPRxPOS is write-only, and only really useful when not using sprite dma (unless you're doing fancy tricks mostly used by demos/games).
|
![]() |
![]() |
#354 | |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Quote:
I know now that the data structure at SPRxPT is where all sprite information is actually held. Now I can see the VH positions in the data structure update with the movement of the mouse, and see the sprite image data after them. Right now I'm trying to figure out how to integrate the Sprite generation into my Bitplane generation. My current, approach is thus (for each horizontal line): 1. Wait for the Bitplane fetch to finish (checking DFFSTOP). 2. If the Sprite DMA is enabled, check each sprite's VPOS. 3. If the Sprite VPOS equals the display VPOS, then calculate the sprite's x position on the line and draw a line of the sprite in the correct position in the framebuffer (which, by now, will already have Bitplane data in it). 4. Increment the Sprite VPOS, and increment the sprite colour data pointer (to the next line of sprite data). 5. if the VPOS > the sprite VSTOP, then shutdown sprite. 6. Repeat. It's sort of working, too... ![]() |
|
![]() |
![]() |
#355 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
The BIG problem I have now is that sprites and biplanes are not matching up, horizontal position wise.
Very easy to see when using DPaint as, it has a software generated colour dot that should be at the centre of the Sprite crosshair. I realises this is due to me completely ignoring the DIWSTRT and DIWSTOP horizontal position, and working out the horizontal display postisition using the DFFSTRT value.... ![]() Ok... I guess I need yet another Bitplane generation rewrite... ![]() |
![]() |
![]() |
#356 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Ok, I've temporarily Kludged the problem by Starting the drawing at this DMA position:
Line DrawingStart = (((DWSTRT & 0xFF) >> 1) - DFFSTRT) - 6 Not totally sure why this works, but it means my Bitplane and sprites now match up on the host framebuffer ![]() |
![]() |
![]() |
#357 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
First time ever KickStart 3.0 has booted!
Though, my hardcoded DFFSTOP is cleary causing issues... -Edit- after a little playing, it seems that Kickstart 3.0 is doing something else a bit weird on the boot screen... not really sure what ![]() Last edited by bloodline; 29 April 2022 at 21:00. |
![]() |
![]() |
#358 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 1,008
|
I'm out of your league, but I like following your endeavour, such gfx I experienced when I mismatched fetch modes.
|
![]() |
![]() |
#359 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,367
|
booting a kickstart is really not trivial, even with trashed display mode. Well done!
|
![]() |
![]() |
#360 | |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Quote:
What I need to do now is properly implement the DFF and DIW relationship, and Kickstart 3.0 seems like a good candidate for testing this. Last edited by bloodline; 30 April 2022 at 12:15. |
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
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 |
|
|