-
Notifications
You must be signed in to change notification settings - Fork 21
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
Potential Support Params #42
Comments
So there's a lot to unpack here, I'll try to answer each question you might have:
C64, C128, MSX2 – there should be no problem. There are no premade libraries for interfacing with MSX hardware, but this leaves you freedom to implement them yourself as you see fit. 68K, x86 – sorry, Millfork does not support these at the moment. There's an experimental x86 support, but it uses the tiny memory model, emits COM executables and at best it allows you to quickly port small text-mode programs from CP/M to DOS. For these platforms I'd recommend C. 65816 – it's complicated, but I wouldn't recommend Millfork here either. The only 65816 platform that anyone successfully got working was SuperCPU, which, with its 16-bit address space, is more of a weird 65C02 rather than real 65816 platform like SNES or IIgs. For 65816, I think going pure assembly is the best way forward, unless you want to deal with inefficient and buggy C compilers.
One of the design goals of Millfork was being able to easily handle most common cartridge types. I checked out GMod2 and it looks like it should work fine. The general idea is you want to:
See these for inspiration:
That should work. You will have to write separate loading/unpacking/copying routines for each platform and separate configuration files. If the code will be split into the same segments on each platform, then usually you shouldn't need anything else. If you have any further questions, feel free to ask. |
Ok. How do I teach Milfork how to swap banks? Is it possible to get another "listing" output that lists the source file lines and the memory addresses of code? something along the lines of |
Millfork doesn't swap banks automatically. You need to do it manually. Any generic automated solution would risk being suboptimal. If by "bank swapping" you wanted to ask how to call a function that was defined in another segment, well, you just call it, but if that segment wasn't containing that function at runtime (wasn't loaded, wasn't banked in, etc.), then oops. In the MMC4 case, I defined a function If you wanted to ask how you swap banks on a cartridge, then that depends on the cartridge itself. I'm not familiar with GMod2 or MSX2 cartridges.
Currently, you can use
I haven't used that, it looks very interesting, thanks! I'll try it out and add support for it in the next release if possible. |
I see hours of me going "why does this fail" and then eventually working out I'm calling "this function" which is not visible at the time of calling because it is in another bank and the code just jumps into random data. Also on the 128 it could be in the other RAM bank. having say a call_long and having compiler know when things are not in parts that are visible at the same time. Maybe just throws a warning? since the banks occupy the same address space, the check could check if the addresses are in the same "area" but not the same final address. It would be a huge convenience if one could make say Macros that force set the bank, and the optimizer knows to look for them. so if I do A trampoline is fine, but how do I construct a trampoline that can take "what ever params" the function wants and bounce. Is there a concept of "set these params" then I can call_trampoline separately? Speaking of Other 128 bank, what are the guidelines for the 128 MMU usage, does milfork need 'Shared Memory' always enabled? both upper -and lower, just lower, 1K 4K etc |
So I'm looking to make a Tactics game for the Commodore 64 and Commodore 128, but I want to also be able to port it to the MSX2 and possibly other architectures (68K, 65816, x86). So this seems to be the best fit, however I need a full 512K GMod2 supported, and 512K MSX2 cart support. Is this system capable of handling such carts. With it me being able to have Cart resident code and code that is copied to RAM, possibly compressed with say Exomizer to get every last drop of space out of it. But then the 128 version might have the "ROM banks" execute from its extra RAM and it loads data from disk etc.
The text was updated successfully, but these errors were encountered: