apemaster Posted March 27, 2015 Share Posted March 27, 2015 I have a game that first loads a title-screen, then produces a coldstart and then loads the main game. If you just load the main-game, it works fine. But if you first load the title, then the game crashes, seemingly because the screen-mem is at the same location as the pm-ram. Shouldn't the ram be erased if you do a coldstart? Quote Link to comment Share on other sites More sharing options...
kenjennings Posted March 28, 2015 Share Posted March 28, 2015 My guess is that it doesn't actually coldstart. A coldstart should be the same as turning the system power off and then on again. In that case all you would get is the title screen again. Quote Link to comment Share on other sites More sharing options...
miker Posted March 28, 2015 Share Posted March 28, 2015 I think the best solution to have memory cleared is to run a program which does such a thing first. Some example can be found here: http://atariage.com/forums/topic/186656-clearing-a-section-of-memory/?hl=%2Bclearing#entry2355276 Quote Link to comment Share on other sites More sharing options...
Rybags Posted March 28, 2015 Share Posted March 28, 2015 (edited) The OS only clears what Ram it finds, that can vary depending if a cartridge is inserted or if Basic is enabled or not. And can vary again if it's a switchable or bankable cartridge if the system restarts but not as result as powering off. In "proper" emulation the Ram should assume a random pattern or pattern resembling what the real thing does but many emulators just zero everything. I think Altirra now tries to do what happens on real hardware, would need to do some digging to work that out. Passing information across a coldstart - on a 64K system it's easy enough since there's 16K of Ram under the OS that goes undisturbed. On a 48K system - I don't think it can be reliably done. You can force a disk reboot without doing a coldstart/Ram clear - use a CASINI routine that gets called on warmstart. In that routine, clear the BOOT flag (9) and WARMST flag (8 ). When you return, the OS will attempt to boot from disk (so long as a cartridge that disallows disk boot isn't inserted). Call the warmstart vector when you require the boot - JMP $E474. Edited March 28, 2015 by Rybags 1 Quote Link to comment Share on other sites More sharing options...
phaeron Posted March 28, 2015 Share Posted March 28, 2015 Address 0 is not cleared by the XL/XE OS on cold start, so it's possible for information to leak that way. You'd have to be a certifiable idiot to rely on that, though. Emulators aren't guaranteed to handle a jump to COLDSV the same way they handle a true cold start. Altirra doesn't. Among many things, this means that Option won't be automatically held down and the BASIC ROM can turn back on. 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.