cdoty Posted August 19, 2022 Share Posted August 19, 2022 (edited) I put up a github repo with a working example using the Millfork compiler, Visual Studio Code, and MAME for debugging. https://github.com/cdoty/Aquarius-Millfork Edited August 19, 2022 by cdoty Added tags. 2 Quote Link to comment Share on other sites More sharing options...
jltursan Posted August 19, 2022 Share Posted August 19, 2022 Millfork?, never heard about it but it really intrigues me. Seems to be a compiler of a C-related language, does it adds something nice that a Z88dk C framework doesn't allows to do it easily, maybe something more game-oriented feature?, does it generates bloated executables (as per the specifications, seems to build small executables) or is it not as fast as expected? Btw, no idea of how to run it, seems a very complex framework and needs quite some work to setup. Can you provide some ready-made binary, cart o whatever runnable file...or at least a video...I'm really curious about it... Quote Link to comment Share on other sites More sharing options...
cdoty Posted August 19, 2022 Author Share Posted August 19, 2022 (edited) The big difference between Millfork and Z88dk, SDCC, etc. is that it allows a lot closer integration between assembly and the C like language. You don't have to jump through hoops to expose an assembly language function to C, etc. Defining macros is also a lot easier than any assembler I've used before. From a software development standpoint, it's easier to create understandable assembly language code, as parts can be written in macros, which look just like normal function calls. This allows large functions to be broken down into pieces without adding overhead for function calls and parameter stack pushing. The code isn't as optimized as assembly, of course, but it's actually not bad. It will only include functions and data that is referenced in code. Of the 4.3k size, half is screen and color data. I added a release with the cartridge binary, and the CAQ and Wave files for the cassette version. I hadn't thought about the binaries, thank you. I also fixed some issues with the mk.bat and mktape.bat files, in the Cart folder. It should build under Windows without any additional software or setup. I would not recommend using the Gameboy tools for graphics. It's overly complex for what is needed, but it was the only thing that I could initially get set up to use the ROM character set. I am in the process of switching to Aquarius Draw. Edited August 19, 2022 by cdoty 1 Quote Link to comment Share on other sites More sharing options...
jltursan Posted August 20, 2022 Share Posted August 20, 2022 (edited) Yep, Aquarius Draw has a handy feature to copy/paste data from the browser to your text editor in a comprehensible format. The only drawback I've found is some unstability when doing long work sessions (seems to loose the internal graphic data). And being a bit nitpicking, exporting images as json files, is not very friendly when integrating the resources with your assembly programs. For maps, I'm using Tiled and some command line tools to convert the saved maps to a more suitable format. Some day I'll check its plug-in features to make one able to export to raw binary format...maybe it exists already... Btw, nice BASIC loader, is it capable of loading more than 16K or uses tape routines other than the ones in the Aquarius ROM?. I've myself another simple loading routine using the standard tape routines and no RAM limit; but I would love to add some kind of "turbo" load feature. Edited August 20, 2022 by jltursan Quote Link to comment Share on other sites More sharing options...
cdoty Posted August 20, 2022 Author Share Posted August 20, 2022 The loader is from Invaders. It's the part2.CAQ file. I'm not sure of the limitations. Quote Link to comment Share on other sites More sharing options...
jltursan Posted August 21, 2022 Share Posted August 21, 2022 Seems to be a standard routine. Using BIOS routines, loads the start,end and exec addresses and loads the bytes stream. It can load any size while there's enough RAM, it doesn't checks the Aquarius RAM configuration. It also has a CRC checking routine, fair enough 😀 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.