Spider Posted May 27, 2016 Report Share Posted May 27, 2016 But if I'm running game files on an emulator, with no loader, how does it know to start at #8400? You have to tell it with a tape file. With USR x (RANDOMIZE USR is the most common followed by PRINT USR) you can do other commands to do it but RAND is the most common 'start' This is more or less (in Basic) saying 'JP / JUMP x' CLEAR is needed before to reserve space and prevent problems, typically the 'start address - 1' is enough but I tend to do a 29999 for JSW, you could get away I think with 32767 for it as the codeblock is starting at 32768. 10 CLEAR 29999 20 LOAD "" CODE 32768 30 RANDOMIZE USR 33792 The address after the load is optional, mainly used to load something somewhere else but provided for an example. IRF 1 Quote Link to comment Share on other sites More sharing options...
IRF Posted May 27, 2016 Author Report Share Posted May 27, 2016 It's all a bit beyond me I'm afraid! I play files using an online emulator called QAOP. I just click 'Open' and then browse for a file (sometimes they're .tap files, sometimes .z80). The emulator seems to go straight to the Title Screen with no bother. Therefore, as far as I am aware, no 'loader' is involved in the process? I was just wondering how the emulator knows where to begin? The specific concern behind my question is this: if I were to put 'meaningful code' (i.e. Z80 commands) prior to #8400, would the emulator chance across that first and try to implement it in the first instance? (The specific location I have in mind is the 2x42 byte chunks of spare code in the Rope Animation Table from #8300.) The same concern could in theory also arise with 'data' bytes, but we did that successfully in The Nightmare Edition (three of the in-game tunes are located in the #8141-81ff region), and it doesn't seem to be mis-interpreted as Z80 instructions, so that's fine. Quote Link to comment Share on other sites More sharing options...
SkoolKid Posted May 27, 2016 Report Share Posted May 27, 2016 I play files using an online emulator called QAOP. I just click 'Open' and then browse for a file (sometimes they're .tap files, sometimes .z80). The emulator seems to go straight to the Title Screen with no bother. Therefore, as far as I am aware, no 'loader' is involved in the process? I was just wondering how the emulator knows where to begin? My earlier answer covers snapshots, but for TAP files, there's always a loader, even if it doesn't look like it. Most emulators have the ability to 'fast load' TAP files, which means the USR command in the BASIC loader is executed almost immediately, without you having to wait for the tape to play in real time. IRF 1 Quote Link to comment Share on other sites More sharing options...
IRF Posted May 27, 2016 Author Report Share Posted May 27, 2016 (edited) Thanks for the responses everybody. It's a lot clearer now. Excuse my previous ignorance in such matters! Edited May 27, 2016 by IRF Spider 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted May 28, 2016 Report Share Posted May 28, 2016 Ian, if you fire up ZXSpin and set the tape speed to normal and then load a .tap or .tzx you'll see the 'loader' as such. On flash or edge loading its so fast you are unlikely to see it at all. As said snapshots such as .z80 / .sna etc are a complete memory 'image' so it knows where to start (in reality, where to 'carry on from') IRF 1 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.