fandango2021 Posted December 11, 2021 Share Posted December 11, 2021 Hello! When I load an ATR or CAS file to Altirra, where is loaded the first instruction in memory (like the main function from C)? How do I know that? From the ATR or CAS file? Or is predefined by the emulator? Thanks! Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted December 11, 2021 Share Posted December 11, 2021 (edited) Typically anywhere between $480 and the top of memory, e.g. $BFFF. However you can load a bootstrapper that can move loaded memory into an extended bank or in the memory under the OS. Will also depend on whether you are using an existing DOS too. Have a search on the forum for LOWMEM and you come across discussions on the topic. Edited December 11, 2021 by Wrathchild 1 Quote Link to comment Share on other sites More sharing options...
vitoco Posted December 11, 2021 Share Posted December 11, 2021 (edited) The boot record from the ATR or the CAS is loaded in buffer location $400 (128 bytes), then copied to wherever address the word from bytes 2 and 3 (starting from 0) points to. The following sectors/blocks are also loaded from the device into $400 and then copied contiguous to the previous one. The total number of sectors to read is stored in byte 1 of the boot record, and the run address is at byte 6 of the first record (starting from 0 again). Edited December 11, 2021 by vitoco 1 Quote Link to comment Share on other sites More sharing options...
fandango2021 Posted December 12, 2021 Author Share Posted December 12, 2021 Thanks! 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.