mirror of
https://github.com/michaelcmartin/Ophis.git
synced 2024-12-30 10:30:47 +00:00
60f03a34af
16 additional bytes from the zero page are now available; the ZP locations from $02-$8F are now free for your program's use. Approximately 128 additional bytes in main RAM are now available, giving you free reign from $0800-$CFFF. Zero Page backup is now handled underneath the KERNAL's ROM, with the program epilogue safely handling swapping out the KERNAL for the duration of the switch. (IRQs are disabled, and NMI handling code is replicated and modified to not hurt anything.) Program exit is now handled by keyboard buffer and jumping through BASIC's warm reset vector. This technique lets programs play more nicely with PUCRUNCH and onefilers (which otherwise often confused BASIC as the BASIC prologue would change as part of decompression or link-loading).
30 lines
1.7 KiB
Plaintext
30 lines
1.7 KiB
Plaintext
This directory holds files likely to be of use to you in developing your own
|
|
programs. The contents of each file is summarized below.
|
|
|
|
|
|
c64_0.oph: A Commodore 64 equivalent to a modern compiler's "crt0.s" - it
|
|
contains a .PRG file header, a short BASIC program that launches
|
|
the machine language program, and a prologue and epilogue that
|
|
prepare memory for your use and then clean it up again when you
|
|
are done. Memory locations $02 through $8F on the zero page are
|
|
available for your use, and the program lives at the beginning
|
|
a contiguous block of RAM from $0800 through $CFFF. The BASIC
|
|
ROM is swapped out of memory (leaving $A000-$BFFF as RAM) for
|
|
the duration of your program. BASIC's working storage on the
|
|
zero page is backed up in the RAM underneath the KERNAL ROM
|
|
while your program runs.
|
|
|
|
c64kernal.oph: A collection of standard aliases for the KERNAL routines on the
|
|
Commodore 64. Names for these routines have been chosen to match
|
|
the Commodore 64 Programmer's Reference Guide. Additional useful
|
|
constants are defined for the character codes for color changes
|
|
and case-changing.
|
|
|
|
nes.oph: A somewhat skeletal collection of aliases for the PPU registers
|
|
on the Nintendo Entertainment System. These names were chosen
|
|
to match the constant names given on the NESdev Wiki.
|
|
|
|
stella.oph: A collection of aliases for the registers of the Atari 2600.
|
|
These names were taken from the "Stella Programmer's Guide" and
|
|
are in wide use amongst developers and code analysts alike.
|