This may be the wrong forum, but I'm hoping I catch the attention of an old-school Apple ii dev.
I have been writing so programs for the Apple //e and I'm really enjoying it. I've broken away from
Atari 2600 development for a bit to see what a real machine can do.
I've played around with Applesoft Basic in the past, and have written some crummy games with it. Now that I know how to write 6502 assembly, I'm wanting to write a homebrew game for the Apple //e.
I'm not sure though what needs to be done to run the application on boot. Is it a situation where you do a BRUN / BLOAD somehow?
Running 6502 assembly program on boot for the Apple //e
- Johnny Starr
- Posts: 58
- Joined: 30 May 2012
- Location: Dallas, TX
- Contact:
Re: Running 6502 assembly program on boot for the Apple //e
It has been since high school that I've touched an Apple II, II+ or Apple IIe.
What I remember was that memory was divided up into two or three segments depending on how much memory you had which served as a kind of copy protection.
I used Google to find your answer:
http://www.landsnail.com/a2ref3.htm
You may also need to find a proper memory map of the Apple of your choice.
Use Google as your friend.
What I remember was that memory was divided up into two or three segments depending on how much memory you had which served as a kind of copy protection.
I used Google to find your answer:
http://www.landsnail.com/a2ref3.htm
You may also need to find a proper memory map of the Apple of your choice.
Use Google as your friend.
Re: Running 6502 assembly program on boot for the Apple //e
A quick bit of searching via google leads to http://en.wikipedia.org/wiki/Apple_DOS#Boot_loader the text of which suggests that having a BASIC program file named "HELLO" might suffice for an automatic start with stock DOS. I don't know if it would work for a binary program. You could also patch the DOS image on the disk to load a different file, or if you're going to be working in assembler anyway you might go with a substantially customized startup procedure.
It's been a while since I've done any serious apple2 work, so I'm more than a bit rusty on the details, I'm afraid. I should have access to some of my old manuals in about a week, though.
It's been a while since I've done any serious apple2 work, so I'm more than a bit rusty on the details, I'm afraid. I should have access to some of my old manuals in about a week, though.
Re: Running 6502 assembly program on boot for the Apple //e
I have a disk which boots a machine code program I wrote. There is the classic "HELLO" file ('cept I named mine "IALIZE") but it's type B instead of type A or I. It runs on boot. Frankly, I have no idea how I did that.
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: Running 6502 assembly program on boot for the Apple //e
For a ][+ or newer:
For an original ][:
Actually, the second one is the most portable, although not the most readable.
Mike B.
Code: Select all
NEW
10 TEXT : HOME : PRINT "... INITIALIZING ... ONE MOMENT ..."
20 PRINT CHR$(4)"BRUN GAME"
SAVE HELLO
Code: Select all
NEW
10 TEXT : CALL -936: PRINT "... INITIALIZING ... ONE MOMENT ..."
20 PRINT "BRUN GAME" : REM INVISIBLE CTRL-D BEFORE BRUN
30 END
SAVE HELLO
Mike B.
Re: Running 6502 assembly program on boot for the Apple //e
KC9UDX wrote:
I have a disk which boots a machine code program I wrote. There is the classic "HELLO" file ('cept I named mine "IALIZE") but it's type B instead of type A or I. It runs on boot. Frankly, I have no idea how I did that.
so find the poke and do it, INIT whatever, (and it'll save the BASIC program as whatever. then delete whatever and bsave your binary with the whatever name.
though just having a basic program BRUN it is definitely the easier option.
there is also a hook inside DOS that's just BEGGING to be used for this btw. It does a useless call RIGHT before loading and running the hello program. Replace that with a call to some ML embedded in one of the unused little nooks inside dos, and the startup ML doesn't even have to be a FILE. (and is also very hard to stop) Good place for something that requests a password for your disk
Re: Running 6502 assembly program on boot for the Apple //e
If you want to run a program on boot, then you need to burn it into an EPROM and put it on an expansion card.
If the program is less than 256 bytes, you can put it map it into $CX00 where X is the slot number.
The first few bytes need to be the ID of a disk controller so the ROM will jump to the code.
If the program is >256 bytes but <2K, then you probably want to map it to $C800
You still need some minimal code to $CX00 to jump to $C800.
Toshi
If the program is less than 256 bytes, you can put it map it into $CX00 where X is the slot number.
The first few bytes need to be the ID of a disk controller so the ROM will jump to the code.
If the program is >256 bytes but <2K, then you probably want to map it to $C800
You still need some minimal code to $CX00 to jump to $C800.
Toshi