Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System Div (no BIOS) does not match BIOS System Div #1396

Closed
felixjones opened this issue Apr 25, 2019 · 1 comment

Comments

@felixjones
Copy link

@felixjones felixjones commented Apr 25, 2019

Attached is a ROM I created that demonstrates a difference between mGBA and hardware no BIOS and with BIOS system division.
VisualBoy Advance closely mimics the result I see on hardware (AGB-001 with AGS-101 backlight). (My BIOS was being used in VBA).

mGBA (no BIOS)
mGBA_stable

mGBA (with BIOS)
mGBA_with_bios

mode1_hdma_bios_div.zip

Original ROM information below - feel free to ignore

I had replaced the division calls in my code with the BIOS Div function, before I did this the ROM worked on hardware and mGBA perfectly fine, but after replacing divisions with the BIOS Div this is the result I get.

This uses Mode 1 display with a single affine background.
DMA channel 3 is used with hblank to copy the affine transformation parameters. Channel 0 also demonstrates this same issue.
There is a BIOS IntrWait for VBlank each frame.
The DMA is restarted on VBlank interrupt and the matrices updated immediately after.
Reading and writing occurs on different areas of memory; there is no overlap.

The affine parameters are generated during the interrupt routine, this kind of flickering is what I see when this process takes too long (missing VSync), but it was fine before adding in the BIOS division, using BIOS divisions seems to have caused this.
Divides by zero has been accounted for, even when aggressively checking for them this still occurs.

To clarify: My ROM and code are incorrect and buggy, just that mGBA does not display the bug that hardware (and sort of VBA) displays.

@felixjones felixjones changed the title Mode 1 HBlank DMA + BIOS Div does not match hardware System Div (no BIOS) does not match BIOS System Div Apr 25, 2019
@felixjones

This comment has been minimized.

Copy link
Author

@felixjones felixjones commented Apr 25, 2019

Updated issue now that the problem has been tracked down to System Div without BIOS vs with BIOS.

@endrift endrift closed this in 223be49 Apr 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.