Nemesis 3 Basic Loader for extracted .bin files

Door alessandro_scaccia

Resident (41)

afbeelding van alessandro_scaccia

25-04-2019, 09:42

Hi at all,

I extracted the Megarom Nemesis3 through the romsplit tool in blocks of 16kb and add 7 byte header for bload, I packeted the files to compress them with the RNC tool made by cax, I think.

At this point I didn't understand how to make a Basic Loader to load them.

If we take an example for example of Nemesis, we can see that there is a .bas or .cas which loads all the pieces.

Can anyone give me a way forward?

Thank you very much.

Aangemeld of registreer om reacties te plaatsen

Van RetroTechie

Paragon (1563)

afbeelding van RetroTechie

25-04-2019, 10:55

If a file is BLOAD'ed, it just gets loaded into RAM (somewhere in the upper 32K part used by BASIC), and sits there doing nothing.

This is where the ,R option of BLOAD comes in. This calls a machine code routine at the specified address. Of course programmer who creates the BLOAD file must also create that machine code.

Most cracked versions of MegaROMs use this to fill a memory mapper with the ROM's data, by doing BLOAD,R a number of times. Usually the machine code in EACH file then does something like:

        do some slotswitching (optional)
        shuffle memory mapper blocks around
        copy data that was just BLOAD'ed to its destination block in the memory mapper
        restore memory mapper configuration as it should be in BASIC
        restore slot configuration (if changed)
        return to BASIC

When all that is done, you have the MegaROM's contents in the memory mapper. But then you still need some machine code to start it. So last block BLOAD'ed needs to do more work to get things running.

The details are all different per MegaROM, and per cracked version / hacker / programmer who created that. If you really want to, perhaps the best way to understand how, is just take a (any) cracked MegaROM, and follow how it's done. See what the BASIC loader does, get a debugger & see what exactly each piece of machine code does & where data ends up, etc. Question Do this for a number of cracked MegaROM's, and you'll be a master hacker in no-time! Nishi (just kidding)