chrismaltby / gb-studio

A quick and easy to use drag and drop retro game creator for your favourite handheld video game system
https://www.gbstudio.dev
MIT License
8.47k stars 469 forks source link

[Discussion] GBDK for Windows and GBDK-n for Windows #67

Closed tommai78101 closed 1 week ago

tommai78101 commented 5 years ago

GBDK for Windows, we know it's old.

GBDK-n for Windows is newer. It uses an updated SDCC compiler. Can compile GB source codes on Windows 10, but it will print out warnings, and the GB binary can be played in the emulator.

https://github.com/andreasjhkarlsson/gbdk-n

See this issue here about Windows 10 for some examples of error warnings when compiling using the newer SDCC compilers. https://github.com/andreasjhkarlsson/gbdk-n/issues/12

Perhaps the author and contributors can look into GBDK-n for Windows instead of GBDK for Windows?

chrismaltby commented 5 years ago

I managed to get gbdk-n running with the examples but someone said on a different issue that it doesn't support banking which would be a pretty big problem. I could be wrong though if someone wants to try it out.

tommai78101 commented 5 years ago

@chrismaltby You mean this issue?

https://github.com/andreasjhkarlsson/gbdk-n/issues/5

It seems the banking issue stemmed from the SDCC compiler. If you scroll all the way down to the very bottom, you'll see another GBDK fork build in a ZIP (available to download from that Github issue) that resolves the SDCC compiler's banking issues? The original forum thread which hosted the ZIP file no longer exists, so someone put up a mirror for that ZIP.

I'm not sure.

ParzivalWolfram commented 5 years ago

RGBDS or bust. It's superior in almost every way.

Use GBDK if you want, but I'd recommend RGBDS.

chrismaltby commented 5 years ago

A while ago, I found a modified version of GBDK with extended libs from 2010. That one uses a newer SDCC that has been modified to support banking (and it works). Maybe you could check it out and see if that would help here? http://www.rrsd.com/software_development/gameboy_development/ That link is dead ATM, so here's the relevant zip file: gbdevelopmentkit.zip

I tried getting this modified version of SDCC compiled for macOS but getting lots of errors, if we migrate to this method I'd like to be on the same version across all platforms. Not tried Linux yet.

Anyone had any luck building this version? The one from the ZGB environment package https://github.com/Zal0/ZGB/wiki/Installation isn't any better is it?

The other option like @ParzivalWolfram says is to rewrite in RGBDS, but I'm not even sure where to begin approaching that one, if someone wants to have a go then please do but again it will need to work cross platform.

tommai78101 commented 5 years ago

I tried getting this modified version of SDCC compiled for macOS but getting lots of errors, if we migrate to this method I'd like to be on the same version across all platforms. Not tried Linux yet.

What about getting the latest SDCC compiler, and then rebuild GBDK from there?

I don't have testing hardware, so I don't know how to work with SDCC compiler.

Zal0 commented 5 years ago

I managed to get the latest version of SDCC working with ZGB. In short, you need to link with the old linker (which works well) and compile with the newest SDCC

The process is more or less detailed here https://github.com/andreasjhkarlsson/gbdk-n/issues/5#issuecomment-313174321

I'll be happy to help if you need it :)