Post by uto on Oct 21, 2020 9:15:42 GMT
Hi All,
I've been looking at AGD for a while, and I specially had a look at the compiler, but I actually never have worked with it. On the other hand, I know it's a very successful engine, and after reading the manual I understand why. That success is what brings me here, but not to start working with AGD, but to find some tips to do something I believe can be very useful: creating games with AGD that can boot directly from SD card in a DivMMC or even form a CF in a DivIDE. That is make SD cards behave like a game cart.
To begin with, probably you know DivMMC(and DiviIDE), it is probably the most successful interface in the Spectrum world since the Kempston one, and there are not many people using a real Spectrum today who doesn't have one. On the othe hand, distribution of games in SD format would be a great idea, cause SD cards are cheap and easy to obtain. But there was a problem...
You can bundle your game in a SD card, but then the user has to install it in its own cardm which is not like a cart experience. Also, ESXDOS (DivMMC/IDE OS) requires having same version in both the DivMMC flash ROM, and in the SD card, so no SD card could be made that works in all DivMMCs, as if you put files for some specific version, it will only work with DivMMCs with that version.
But then we hacked that... A few days ago, after some investigation, a group of people in a Telegram group discovered BETADISK.SYS file included in ESXDOS is actually executed when loaded, which means you can replace BETADISK.SYS file with anything you want, and take control from that point. That fastly leaded to a bootable copy of Manic Miner.
After some testing, with some issues that were solved, we are ready to say it is possible to make a SD card that boots in any DivMMC/IDE device with ESXDOS 0.8.5 or above (a version which is 5 years old). We believe it may work in older versions, but we could not test it.
Once we knew the way to do it, I started to think how to make it easier to use for other people, so right now in the page I will link below there are two loaders (two versions of BETADISK.SYS)
1) A simple loader that loads a file named AUTOEXEC.BIN at 32768 and runs the code at that same address.
2) A simple loader to load DAAD Adventure Writer games.
The first one is easy to adapt, and source code is available, but I would like to add another loader for the AGD compiler at least, which seems to load code at 24832 and run from that same address, but I'm not sure if it can generate a plain BIN file. Also, I'm unsure how this may work with older versions of AGD (the Spectrum based ones). If I can have technical information and some sample games I could do my testings and prepare a loader which would allow AGD users to create nice physical bundles with SD cards. Can you hellp me find that information?
Also, this option opens new capabilities, as when the game boots from SD, you can use many of the ESXDOS methods, which means you can read and write files, what leads to possibilities of having different sprites in different stages, and even loading colourful loading screens whenever you want, without thinking in RAM limitations.
More information about the boot system here:
github.com/Utodev/utoboot?fbclid=IwAR1ld95QGBlVsJg2gIQbkp9PQkOBUpd_gO1gCGXHtBZJt5-HpdCp9-VA0Ks
I've been looking at AGD for a while, and I specially had a look at the compiler, but I actually never have worked with it. On the other hand, I know it's a very successful engine, and after reading the manual I understand why. That success is what brings me here, but not to start working with AGD, but to find some tips to do something I believe can be very useful: creating games with AGD that can boot directly from SD card in a DivMMC or even form a CF in a DivIDE. That is make SD cards behave like a game cart.
To begin with, probably you know DivMMC(and DiviIDE), it is probably the most successful interface in the Spectrum world since the Kempston one, and there are not many people using a real Spectrum today who doesn't have one. On the othe hand, distribution of games in SD format would be a great idea, cause SD cards are cheap and easy to obtain. But there was a problem...
You can bundle your game in a SD card, but then the user has to install it in its own cardm which is not like a cart experience. Also, ESXDOS (DivMMC/IDE OS) requires having same version in both the DivMMC flash ROM, and in the SD card, so no SD card could be made that works in all DivMMCs, as if you put files for some specific version, it will only work with DivMMCs with that version.
But then we hacked that... A few days ago, after some investigation, a group of people in a Telegram group discovered BETADISK.SYS file included in ESXDOS is actually executed when loaded, which means you can replace BETADISK.SYS file with anything you want, and take control from that point. That fastly leaded to a bootable copy of Manic Miner.
After some testing, with some issues that were solved, we are ready to say it is possible to make a SD card that boots in any DivMMC/IDE device with ESXDOS 0.8.5 or above (a version which is 5 years old). We believe it may work in older versions, but we could not test it.
Once we knew the way to do it, I started to think how to make it easier to use for other people, so right now in the page I will link below there are two loaders (two versions of BETADISK.SYS)
1) A simple loader that loads a file named AUTOEXEC.BIN at 32768 and runs the code at that same address.
2) A simple loader to load DAAD Adventure Writer games.
The first one is easy to adapt, and source code is available, but I would like to add another loader for the AGD compiler at least, which seems to load code at 24832 and run from that same address, but I'm not sure if it can generate a plain BIN file. Also, I'm unsure how this may work with older versions of AGD (the Spectrum based ones). If I can have technical information and some sample games I could do my testings and prepare a loader which would allow AGD users to create nice physical bundles with SD cards. Can you hellp me find that information?
Also, this option opens new capabilities, as when the game boots from SD, you can use many of the ESXDOS methods, which means you can read and write files, what leads to possibilities of having different sprites in different stages, and even loading colourful loading screens whenever you want, without thinking in RAM limitations.
More information about the boot system here:
github.com/Utodev/utoboot?fbclid=IwAR1ld95QGBlVsJg2gIQbkp9PQkOBUpd_gO1gCGXHtBZJt5-HpdCp9-VA0Ks