src | ||
assemble.sh | ||
blankdisk.po | ||
build_env.sh | ||
LICENSE | ||
README.md |
mrbuffer
A small text editor for the 40 character buffer of the Apple IIgs I used to learn 65816 assembly. Here's technical walkthrough on how I built it!
Getting Started
Requirements
I used BrutalDeluxe's Cross-Dev Tools: CADIUS for disk imaging and the Merlin32 assembler. We'll be building them from source since they are not large.
- A *nix flavor would be helpful!
- GNU build tools
- Some patience (my scripts might not build everything right on your system)
- An Apple IIGS emulator of your preference + the appropriate ROM (which you'll have to find)
- The assemble script uses
gsplus
- The assemble script uses
OS X Users: Merlin has an issue with a65816_Line.c:L2412
that I crudely patch with sed
, so if you have issues look there first. Works for me on Sierra with the XCode build tools.
Building
There are two scripts here which will get all the tools needed to assemble the game.
./build_env.sh # Downloads and builds Cadius and Merlin
./assemble.sh # Assemble and launch
The assemble
script runs the source through Merlin32, then changes the ProDOS file kind to S16
, an executable format that is used for GS/OS applications. _FileInformation.txt
is what cadius
uses to manage the ProDOS metadata for each record (since obviously this information can't be mapped to your computer's filesystem).
I also extracted the Merlin16 macros from the original images. I'm not using them yet but I imagine I will need to in order to implement quitting, etc.
References
There are a lot of good materials out there: here is what I used to make this. Additionally, thank you to the Apple IIGS Enthusiasts Facebook group and #a2chat
over at irc.a2central.com
for answering my questions.
- IIgs Hardware Architecture
- p. 74 has a memory map
- IIgs firmware reference
- Scanlon's IIgs Assembly Programming
- Tremendously useful reference for QuickDraw and some tools
- Programming the 65816 and 65xx family
- Official WDC manual.
- "PEI Slam" fast SHR rendering
- Changing ProDOS file types with Cadius
- 6502 opcode list
- 65816 opcode list
- BrutalDeluxe GS/OS internals (VERY USEFUL)
- Apple II 6502 for beginners
- Has practical examples for reading user input, etc.
- System monitor reference
- SNES CPU overview, same CPU, nice insights
- SNES opcode list
- 65816 primer
- Another 6502 reference, insightful
- 65816 interrupts guide