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

[GB Video] VRAM locking not emulated #1109

Closed
ISSOtm opened this Issue Jun 24, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@ISSOtm

ISSOtm commented Jun 24, 2018

mGB does not prevent writes to VRAM during LCD Mode 3. (For some reason, OAM is properly locked out.)

gb/memory.c:242 return gb->video.vramBank[address & (GB_SIZE_VRAM_BANK0 - 1)];

This should be appended to

if(gb->video.mode == 3) {
    return 0xFF;
}

This needs to also be applied to lines 312-313 (blocking VRAM writes), and to gb/io.c, lines 491/492 and 500/501, peppering

if(gb->video.mode == 3) {
    return;
}

(This blocks GBC palettes during Mode 3)

Example ROM, which exhibits this behavior: https://github.com/eevee/anise-cheezball-rising

Note that even with this applied (on my local fork), the output doesn't match BGB's. Implies timing errors, maybe tested by gekkio's ROMs. But that's a different problem.
image

@endrift endrift closed this in e783336 Jun 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment