patch for non-scorpions
ZXNet echo conference «code.zx»
From Kirill Frolov → To All 1 April 2002
Press RESET immediately, All!
=== Cut ===
; (L) Copyleft Kirill Frolov 03/31/2002
;
; DETERMINING THE TYPE OF MACHINE IS AVAILABLE
; AT THE BOTTOM OF THE FILE FOR THERE IS A STORM
; SUX AND MAZDAI, BUT THERE IS ZASM
; RULEZ EUSUAL
;
; Patch for Basic-128.
; The patch is applied using STORM
; assembler The patch does the following
; changes in BASIC firmware:
;
; 1. Removed from the menu
; "Tape Loader" item.
; 2. The item "TR-Dos" is put first
; in the menu (instead of "Tape Loader").
; 3. The last item "TR-DOS" has been replaced
; item "Reset" to perform
; cold reset programs.
; 4. If at the moment of reset the
; Caps Shift key then happens
; exit to the menu without performing
; "cold reset".
; 5. While holding down the Symbol Shift key
; Basic-128 starts
; (program in shadow bank ROM
; will not be launched).
; 6. If the above keys are not
; are held, then checked
; RAM contents by addresses
; #5c00..#5c0f. If audited
; cells are filled with one value
; what is supposed to have happened
; the computer turns on and happens
; execution of the cold program
; reset", otherwise exit
; on the menu.
;
; Notes:
; To call an image test from
; Basic-128 required when resetting
; hold down 3 keys at the same time:
; Caps Shift, Symbol Shift and Space
; (or Symbol Shift and Break).; While simultaneously holding
; Caps Shift and Symbol Shift
; (or one Ext Mode key)
; you will exit to the Basic-128 menu.
; By exiting to the menu we mean
; launching a program from a shadow bank
; ROM" on computers like Scorpion and
; Kay or exit to the Basic-128 menu
; on a Pentagon type computer (if
; If necessary, the program can be
; upgraded to run programs
; from an additional ROM bank to
; Pentagon computer). In additional
; the ROM bank can contain commanders
; (boot) TR-DOS (for example
; Quick Commander) or firmware type
; MadROM.
; Under "cold reset"
; implies the launch of the program
; from TR-DOS ROM bank to boot
; boot file (if necessary, it is possible
; modernization of the program for launch
; iS-DOS from hard drive).
;
; For the patch to work correctly
; you need to set the computer type
; to the end of the file: Pentagon or
; Scorpion/Kay.
;
; VIMAIE! The program is not intended
; to fix computer ROM
; Scorpion working with shadow
; monitor. Change ROM contents
; Basic-128 in the Scorpion computer
; DO NOT if you have a shadow monitor.
; If you want to use this
; the patch will have to be abandoned
; using shadow monitor and
; replace the contents of Basic-48,
; Basic-128 and TR-DOS standard
; firmware (for example from computers
; Pentagon or Kay).
;
; and different versions of the Kay computer; program has not been tested and
; may not work.
;
LOAD EQ #8000
JMP128 EQ #0009
TEST128 EQ #00C7
R128FRE EQ #3C20
TEMPSTK EQ #5C08
TEMPPRG EQ #4000
PENT EQ TEST128
ORG 0,LOAD
INCB "room128"
ORG JMP128,LOAD+JMP128
JP TEST
ORG #275E,LOAD+#275E
DB "TR-Two "
DW #2020,#A020
ORG #2784,LOAD+#2784
DB "Reset"
DW #2020,#2020
DW #A020
ORG #2744+2,LOAD+#2744+2
DW #2816
ORG #2744+14,LOAD+#2744+14 DW PRESET
ORG R128FRE,LOAD+R128FRE
PRESET
DI DI.
XOR A
JR INIT
TEST LD A,1
HEAT
LD SP,TEMPSTK
LD HL,RAMPRG
LD DE,TEMPPRG
LD BC,R_END-R_ST
LDIR
OR A
JR Z,POWERUP
LD HL,#5C00
LD BC,#10
LD A,(HL)
CPL1 CPI
JR NZ,BREST
JP PE,CPL1
LD A,#FE IN A,(#FE)
RRA
JR NC,BRESET
POWERUP
LD BC,#7FFD
LD A,#10 JP R_PUP
BRACE
LD A,#7F
IN A,(#FE)
AND #02
JP Z,TEST128 JP MACHINE
SCORP
LD BC,#7FFD
LD A,#1F
LD HL,#0A10; KAY & SCORPION JP R_RES
RAMPRG
ORG TEMPPRG,LOAD+RAMPRG
R_ST
R_PUP LD HL,0
PUSH HL
OUT (C),A
JP #3D2F
R_RES OUT (C),L
LD B,A
OUT (C),H
RST #00
R_ENDMACHINE EQU SCORP; SCORPION & KAY
;MACHINE EQU PENT; PENTAGON
=== Cut ===