Jump to content
IGNORED

RAM not erased after coldstart? (Emulator)


Recommended Posts

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?

Link to comment
Share on other sites

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 by Rybags
  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...