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

Gngeo behaves differently from real hardware when scaling sprites vertically #10

Open
city41 opened this issue Dec 30, 2021 · 7 comments

Comments

@city41
Copy link

city41 commented Dec 30, 2021

Hi Damien,

Would you say this Gngeo repo is currently the best place for bug fixes/features?

I've been exploring vertically scaling sprites, and I found Gngeo behaves a little differently from real hardware. Details here:

https://github.com/city41/neo-geo-scaling

If I can spare some free cycles, I might take a stab at fixing this.

@dciabrin
Copy link
Owner

Hey city41

Thanks for the nice detailed report in the link.

I'm not in touch with Mathieu Peponas, the original author of GnGeo, however I do try to get fixes as isolated as possible in my fork's branches.

So if anything differs from what the real hardware is doing, I think it's fair to fix it in this fork.

What I would do as well is trying to replicate the difference on a more recent emulator like Mame. In the past I already spotted differences between the two (e.g. IRQ handling).

If the problem also reproduces on Mame, we might want to dig further and propose a fix for both emulators.

@city41
Copy link
Author

city41 commented Dec 30, 2021

MAME and Gngeo both render the same way (I added the MAME screenshot to the README at the scaling repo).

But since I am using a NeoSD to test on real hardware, it is possible the NeoSD causes VRAM to have different values than it otherwise would. It's possible MAME and Gngeo are reproducing what a real game would do, I'm not sure how to eliminate the NeoSD as a variable.

@city41
Copy link
Author

city41 commented Dec 30, 2021

I configured NeoSD to boot straight to the game, so possibly that is an accurate simulation? If so, then the differences between real hardware and MAME/Gngeo remain.

@city41
Copy link
Author

city41 commented Dec 30, 2021

neodev said on the TerraOnion discord

Neosd doesn't do any scaling
But you can't trust on emulator accuracy
To run a completely unmodified boot, you need to enable arcade mode (cartridge mode in aes), then take the sd card out
It will boot without ing-game trigger, and it's 100% original cart accurate

I did that, and I still see the differences between emulators and real hardware, so I am thinking this is a true difference.

@city41
Copy link
Author

city41 commented Dec 30, 2021

Started a MAME discussion here

@city41
Copy link
Author

city41 commented Dec 30, 2021

I think this boils down to my error. I was not padding the C ROMs. The NeoSD will load tiny C ROMs and they work. But I am guessing the tiny C ROMs cause strangeness when scaling.

After padding the C ROMs to a more expected size (I did 2mb), the black boxes on hardware went away. Now hardware, MAME and Gngeo all agree with each other.

@city41 city41 closed this as completed Jan 1, 2022
@city41
Copy link
Author

city41 commented Jan 11, 2022

I have found two ways gngeo scales sprites different from MAME and real hardware. I captured them here

https://github.com/city41/gngeoVsmame

Here is how gngeo scales the test sprites

gngeoResult

Versus MAME

mame0220result

I have switched to MAME for my dev purposes. But I still like gngeo and would like to use it. I feel like gngeo is a better chance to build great dev/debug tools such as a vram viewer. As time allows I plan to keep getting to know gngeo's code base and see if I can fix these issues.

In general I find MAME is very accurate. I have yet to find a case where it differs from real hardware.

@city41 city41 reopened this Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants