Marius Posted February 25, 2013 Share Posted February 25, 2013 Hi! In my project to create the 'ultimate' programmers cart, I now managed to implent XDOS and Synassembler (8K ROM) into a Sic cart. This works great. Now I want to go a step further. I want to put extend RAM blocks onto the cart, which will be copied into the XE (64KB) ram, so as soon as the boot process of the cart is finished, the XE ramdisk is already filled with equates and a few tools. This already works; very nice. But... as soon as I hit the 'reset' button on the SIC cart, bank #$00 is enabled again (ofcourse) and then my cart starts everything again. This is not exact what I want... everything I stored on my ramdisk will be gone then, since on this startup the 'fixed' contents of the ramdisk are copied again. So I want to create a 'trap' for this, that the ramdisk is only initialised the very first moment when the computer is switched on, and not again when bank #$00 is started again from the cart. (one could say: simply do not press that button, but it is handy when during coding the computer will hang stuck, to be able this way to reboot again; I do not want to lose ramdisk content). Memory Location $08 is also reset when the computer performs a coldboot, so that is not a good choice, and I have the feeling that $033D-$033F are already set to $5C, $93, $25 as soon as the cartridge is started (is this true?) So -except for chosing my own flag in RAM- is there any solution to do this? (I'm thinking of doing a small checksum check... but i'm not sure whether xdos will move files from location a to b during file operation... so that might hurt the checksum) Anyone a suggestion? Quote Link to comment Share on other sites More sharing options...
Rybags Posted February 25, 2013 Share Posted February 25, 2013 Diag mode carts get control before anything is done to machine's Ram but using that mode isn't really useful for much other than diag tools or games that have a closed environment ie no Dos or anything. Normal mode cart - the INIT procedure should see the WARMST @ $08 flag set to zero and COLDST flag @ $244 set to $FF when the machine first powers up. Quote Link to comment Share on other sites More sharing options...
Marius Posted February 25, 2013 Author Share Posted February 25, 2013 You did put me in an interesting direction though with your diag cart. I see that memory location $00 is not cleared on a coldboot (after the machine is switched on). How safe is it to use $00 as a custom flag? I'd say... after the init of my ramdisk ... i'll write $01 to this location. On next cold boots (without power up) I could read $00 ... and when that reads no zero this means: do not re-init ramdisk. Only problem happens when I would write #$00 myself to location $00 when I'm coding... that would be real stupid thing to do then... Besides that risk... Is that a good idea or a bad idea? Quote Link to comment Share on other sites More sharing options...
+JAC! Posted February 25, 2013 Share Posted February 25, 2013 If you have a RAM disk, it's contents will not be touched by a coldstart. Same is true for the RAM under the OS, so you can put your own flags/checksums there. That's what I did in http://pouet.net/prod.php?which=60943 to keep the menu "as resident as possible". In any case you should include some hot key/key combination to bypass this if required (and perform a "real" coldstart) Quote Link to comment Share on other sites More sharing options...
Rybags Posted February 26, 2013 Share Posted February 26, 2013 Don't rely or use locations 0/1 - their function can differ depending on OS version. The documented locations I mentioned earlier are best practice - the OS Manual has a section devoted to cold/warmstart behaviour. Although not written for the XL OS, almost all of what's mentioned there will apply. 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.