From 2260b5df5219b7ff45b1a573d6eab54b20157d40 Mon Sep 17 00:00:00 2001 From: 4am Date: Wed, 9 Oct 2019 13:15:33 -0400 Subject: [PATCH] more comments on LC2 usage, rename hw.accel, update comments about lineage --- src/4cade.a | 2 ++ src/4cade.init.a | 2 +- src/glue.launch.lc2.a | 9 +++++++++ src/glue.prorwts2.lc2.a | 9 +++++++++ src/{hw.normfast.a => hw.accel.a} | 29 ++++++++++++++++++++--------- src/hw.accel.lc2.a | 15 +++++++++++++++ src/prodos.impl.lc2.a | 9 +-------- 7 files changed, 57 insertions(+), 18 deletions(-) rename src/{hw.normfast.a => hw.accel.a} (93%) create mode 100644 src/hw.accel.lc2.a diff --git a/src/4cade.a b/src/4cade.a index dce3a34d0..de9eaf298 100644 --- a/src/4cade.a +++ b/src/4cade.a @@ -156,6 +156,7 @@ LastMover !source "src/prodos.impl.lc2.a" !source "src/glue.prorwts2.lc2.a" !source "src/glue.launch.lc2.a" + !source "src/hw.accel.lc2.a" LCRAM2_END = * !if * > $E000 { !error "code is too large: ends at ", * @@ -172,6 +173,7 @@ EvenLasterMover !source "src/ui.font.lc2.a" !source "src/glue.prorwts2.lc2.a" !source "src/glue.launch.lc2.a" + !source "src/hw.accel.lc2.a" STACKBASE = * LCRAM2_END = STACKBASE + 16 FONTDST = (LCRAM2_END + 255) and -256 diff --git a/src/4cade.init.a b/src/4cade.init.a index adcd85feb..f6dcde971 100644 --- a/src/4cade.init.a +++ b/src/4cade.init.a @@ -186,7 +186,7 @@ Loader128KAndJoystick !byte 15 !text "joystick + 128K" - !source "src/hw.normfast.a" + !source "src/hw.accel.a" !source "src/parse.games.a" OneTimeSetup diff --git a/src/glue.launch.lc2.a b/src/glue.launch.lc2.a index 0e31bd8fe..200fa5c63 100644 --- a/src/glue.launch.lc2.a +++ b/src/glue.launch.lc2.a @@ -1,3 +1,12 @@ +;license:MIT +;(c) 2018-9 by 4am & qkumba +; +; ProRWTS2 glue functions +; +; /!\ These live in LC RAM 2 and rely on the ProRWTS code which is also in LC RAM 2. /!\ +; Code in LC RAM 1 (which is most program code) should call the functions in glue.launch +; which handle bank switching for you. + LaunchInternal jsr SaveOrRestoreScreenHoles ; save screen hole contents ldy #$F1 diff --git a/src/glue.prorwts2.lc2.a b/src/glue.prorwts2.lc2.a index b82de76b7..76455e2a8 100644 --- a/src/glue.prorwts2.lc2.a +++ b/src/glue.prorwts2.lc2.a @@ -1,3 +1,12 @@ +;license:MIT +;(c) 2018-9 by 4am & qkumba +; +; ProRWTS2 glue functions +; +; /!\ These live in LC RAM 2 and rely on the ProRWTS code which is also in LC RAM 2. /!\ +; Code in LC RAM 1 (which is most program code) should call the functions in glue.prorwts2 +; and parse.prefs which handle bank switching for you. + LoadFileInternal +LDADDR gPathname +STAY namlo ; set filename diff --git a/src/hw.normfast.a b/src/hw.accel.a similarity index 93% rename from src/hw.normfast.a rename to src/hw.accel.a index 279e143ee..909a1bf52 100644 --- a/src/hw.normfast.a +++ b/src/hw.accel.a @@ -1,11 +1,24 @@ -;;; NORMFAST Disable/enable Apple II compatible accelerator +;license:MIT +;(c) 2019 by 4am & qkumba ; -; Release 7 2019-10-04 No functional changes to the -; acceleration routines, but for Total Replay, we split the -; machine identification code from the (de)acceleration code, -; because we can do the ID part once at program startup (when -; ROM is easily available), then (de)accelerate repeatedly -; from the language card. +; Functions to enable and disable acceleration on various +; Apple II models, cards, and environments +; +; Forked from NORMFAST Release 6 (see changelog below) +; +; No functional changes to the acceleration routines, but for +; Total Replay, we split the machine identification code from +; the (de)acceleration code, because we can do the ID part once +; at program startup (when ROM is easily available), then +; (de)accelerate repeatedly from the language card (when ROM +; is switched out). +; +; -------------------------------------------------------------- +; +; Original changelog and documentation: +; +;;; NORMFAST Disable/enable Apple II compatible accelerator +; (no copyright info given) ; ; Release 6 2017-10-05 Fix Mac IIe card check ; @@ -57,8 +70,6 @@ ; addresses are lowercase, constant values are in CAPS -RELEASE = 7 ; our version - romid = $FBB3 ; $38=][, $EA=][+, $06=//e compatible ROMID_IIECOMPAT = 6 diff --git a/src/hw.accel.lc2.a b/src/hw.accel.lc2.a new file mode 100644 index 000000000..4fab1c1bb --- /dev/null +++ b/src/hw.accel.lc2.a @@ -0,0 +1,15 @@ +;license:MIT +;(c) 2019 by 4am & qkumba +; +; Functions to enable and disable acceleration on various +; Apple II models, cards, and environments +; +; /!\ These live in LC RAM 2 and rely on the code which is also in LC RAM 2. /!\ + +EnableAcceleratorAndSwitchToBank1 + jsr EnableAccelerator + jmp SwitchToBank1 + +DisableAcceleratorAndSwitchToBank1 + jsr DisableAccelerator + jmp SwitchToBank1 diff --git a/src/prodos.impl.lc2.a b/src/prodos.impl.lc2.a index f0eb154c6..1628951fa 100644 --- a/src/prodos.impl.lc2.a +++ b/src/prodos.impl.lc2.a @@ -3,6 +3,7 @@ ; ; Pseudo-ProDOS environment ; +; /!\ These live in LC RAM 2 and rely on the ProRWTS code which is also in LC RAM 2. /!\ ;------------------------------------------------------------------------------ ; ProDOS_enter @@ -567,11 +568,3 @@ holepatch ;sta->lda rts holey_stuff !fill 64 - -EnableAcceleratorAndSwitchToBank1 - jsr EnableAccelerator - jmp SwitchToBank1 - -DisableAcceleratorAndSwitchToBank1 - jsr DisableAccelerator - jmp SwitchToBank1