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

Gambatte core CDL problem #1349

Closed
g0me3 opened this issue Oct 13, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@g0me3
Copy link
Contributor

commented Oct 13, 2018

Not sure why, but I see Gambatte core now using a real GB firmware which is a code chunk at 000-100 in CPU address space. the Code and Data Logger seems log this area as well at the boot up.
So we have an interseption between bootstrap ROm and the GB ROM for the game. As a result, when you parse the CDL file, you'll see the area 000-100 marked as executed code while it is not true for game ROM.

I can force my CDL/IDA scripts to ignore this but this is not actually right in general for the CDL logging.

@zeromus

This comment has been minimized.

Copy link
Contributor

commented Nov 12, 2018

So what, you want a special case in the gameboy CDL code that ignores executing in 000-100 simply because in your opinion those executions shouldn't count?

@g0me3

This comment has been minimized.

Copy link
Contributor Author

commented Nov 12, 2018

yeah, there is no special case lol two different ROMs (one inside the CPU and one on the cart) execute the same are of the CPU address space (000-100).

before now there are no BIOS code in gambatte core so CDL logger just record the cart code/data flow.

now the gambatte core MUST use the bios and run it before the ROM, so we have double execution at the 000-100 area.

both are merged with the CDL dumb core because it doesn't know about two different roms are executed at the same rom area (000-100).

so we have CDL with merged code execution flow from BIOS rom and the ROM 000-100 area in one file.

so. what we have. two different roms are mapped at the same place in the CDL file. so we have a wrong code flow trace.

here is two fix path:

  • disable cdl for boot image
  • split bios image and ROM image to two different cdl log chunks in CDL file.
@g0me3

This comment has been minimized.

Copy link
Contributor Author

commented Nov 12, 2018

obviously, this is affects the ID cdl parsing. I can avoid this issue just by avoiding the code ida script in 000-100 area.. but this is not a issue for game boy color. they have more internal rom and this may interfer with more ROM data/code. I can avoid much more code in my scripts but this is ridiculous... I can actually put my head in my ass also the same way... but this is not an option

@zeromus

This comment has been minimized.

Copy link
Contributor

commented Nov 12, 2018

oh, good point! when you put it that way it's embarassing that they get mixed up.

@zeromus zeromus closed this in 25ff1f9 Nov 12, 2018

@zeromus

This comment has been minimized.

Copy link
Contributor

commented Nov 12, 2018

actually I decided to make it not log when the bios was executing after all. I didnt like that it made the ram and rom get touched. its better if the bios is ignored completely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.