You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into a few homebrew ROMs that were obviously written in C. GBDK seems to be the only game in town when it comes to C compilers that target the GB, so I'm guessing that's what was used. Here's what I was able to find about the C calling convention in GBDK: http://gbdk.sourceforge.net/doc/html/c0402.html
From the looks of things, this would be implemented in the .cspec file. I've found the documentation for the cspec format, but it's a lot to work through. I tried copying/pasting the _stdcall convention from Ghidra's included z80 cspec, and then modifying it to remove the register inputs, change the alignment to 1, change the output register to DE, and remove some of the unaffected register nodes (not really sure about that last part). Seems to be a decent starting point.
The text was updated successfully, but these errors were encountered:
I've run into a few homebrew ROMs that were obviously written in C. GBDK seems to be the only game in town when it comes to C compilers that target the GB, so I'm guessing that's what was used. Here's what I was able to find about the C calling convention in GBDK: http://gbdk.sourceforge.net/doc/html/c0402.html
From the looks of things, this would be implemented in the .cspec file. I've found the documentation for the cspec format, but it's a lot to work through. I tried copying/pasting the _stdcall convention from Ghidra's included z80 cspec, and then modifying it to remove the register inputs, change the alignment to 1, change the output register to DE, and remove some of the unaffected register nodes (not really sure about that last part). Seems to be a decent starting point.
The text was updated successfully, but these errors were encountered: