emulate a bank switching cart like BASIC XL. The
only reason it runs on emulators is because the
emulator has that extra code and storage place to
emulate the bank switching cart with, the real
machine has only the cartridge hardware and it's
Method might be better done with reverse order.
DOS is booted which then goes looking for
AUTORUN.SYS file(s) which then load the cart
data. Files such as AUTORUN.SYS have headers that
tell DOS where to place the code while having
two unique places to RUN or INIT the loaded code.
INIT address of 0x02E2, 0x02E3 is always run as
soon as it is changed from RTS address pointed to
by DOS as it loads memory as told to by the header.
This is why AUTORUN.SYS files should only be using
INIT address to run code and should always end with
RTS instruction so that DOS will just resume loading
the rest of the AUTORUN.SYS file. And this means
AUTORUN.SYS files can be appended to do things in
desired order. RUN address 0x02E0, 0x02E1 is jumped
to only after the file is finished loading and
IOCB is closed.
pg 65,66 --- pdf pg 99,100
Cartridge also has INIT and RUN address but at the
end of the cartridge space.
Mapping the Atari
pg 103,104 --- pdf pg 137,138
Executable files always start with FF, FF double
bytes to indicate an executable file follows.
Load to address pair comes next followed by ending
address pair to load data to. Double FF can be repeated,
which will be ignored as next in the file structure
and/or you can have just another pair of load addresses,
start and end. And this pattern can go on as many
times as you need it to. RUN Address can be changed
many times but the only one that is RUN is the last one
It would be a headache WITH the real BASIC XL cart,
without it, I have serious doubts it can be done
on a real machine at all. You would need to write a
custom banking system that used extended memory to hold
the bank switched cart data and then move it along
with changed banking address that is looked at every
interrupt to see if a new bank is supposed to be
there or not. Pure hell if you ask me so I really
doubt anyone, if they have written such a thing, is
here and now to give it away.
So very much easier to get a real BASIC XL cart.
And then start pulling the hair out getting
AUTORUN.SYS to play nice.
Welcome back BTW, nice when that happens.
- mechanerd likes this