Changes

Jump to: navigation, search

No$cart

3,683 bytes added, 13:00, 9 October 2013
/* BASIC patches */
When BASIC is started the sign on messages are not displayed, and it auto runs a command-line.
 
=== DOS/AMSDOS patches ===
 
The DOS/AMSDOS rom has been patched in the following way:
 
* At offset &1c00 the following code has been added (on CPC this is filled with 0x0ff):
 
1c00 c314dc jp 0dc14h
1c03 c35adc jp 0dc5ah
;; this is the command to run
1c06:
defb &aa ;; command to autorun from basic
defb 'RUN"DISC',0
 
defb 'ST2',0
 
1c14 f3 di
1c15 c5 push bc
1c16 d5 push de
1c17 e5 push hl
1c18 e5 push hl
1c19 79 ld a,c
1c1a e60f and 0fh
1c1c 3d dec a
1c1d 82 add a,d
1c1e 5f ld e,a
1c1f 2600 ld h,00h
1c21 6a ld l,d
1c22 54 ld d,h
1c23 29 add hl,hl
1c24 29 add hl,hl
1c25 29 add hl,hl
1c26 19 add hl,de
1c27 29 add hl,hl
1c28 7d ld a,l
1c29 f6c0 or 0c0h
1c2b 57 ld d,a
1c2c 1e00 ld e,00h
1c2e 29 add hl,hl
1c2f 29 add hl,hl
1c30 7c ld a,h
1c31 d5 push de
1c32 214edc ld hl,0dc4eh
1c35 1144be ld de,0be44h
1c38 010c00 ld bc,000ch
1c3b edb0 ldir
1c3d fe01 cp 01h
1c3f de7d sbc a,7dh
1c41 e1 pop hl
1c42 d1 pop de
1c43 06df ld b,0dfh
1c45 cd44be call 0be44h
1c48 e1 pop hl
1c49 d1 pop de
1c4a c1 pop bc
1c4b 37 scf
1c4c fb ei
1c4d c9 ret
 
1c4e ed79 out (c),a
1c50 0602 ld b,02h
1c52 edb0 ldir
1c54 0107df ld bc,0df07h ;; select disc rom
1c57 ed49 out (c),c
1c59 c9 ret
 
1c5a cd96dc call 0dc96h ;; unlock plus features
1c5d 01b87f ld bc,7fb8h ;; page in plus registers
1c60 ed49 out (c),c
1c62 2106dc ld hl,0dc06h
1c65 118aac ld de,0ac8ah ;; setup command for basic.
1c68 010e00 ld bc,000eh
1c6b edb0 ldir
1c6d 21b5dc ld hl,0dcb5h ;; palette
1c70 112264 ld de,6422h ;; plus sprite palette
1c73 0e08 ld c,08h
1c75 edb0 ldir
1c77 110040 ld de,4000h ;; plus sprite ram
;; unpack pixels into sprite ram
1c7a 7e ld a,(hl)
1c7b 0f rrca
1c7c 0f rrca
1c7d 0f rrca
1c7e 0f rrca
1c7f 12 ld (de),a
1c80 1c inc e
1c81 eda0 ldi
1c83 03 inc bc
1c84 10f4 djnz 1c7ah
 
1c86 1660 ld d,60h ;; plus sprite coordinates
1c88 0e0d ld c,0dh
1c8a edb0 ldir
 
1c8c 01a07f ld bc,7fa0h ;; page out plus registers
1c8f ed49 out (c),c
 
;; lock plus
1c91 0110bc ld bc,0bc10h
1c94 1803 jr 1c99h
 
1c96 0111bc ld bc,0bc11h
1c99 21a4dc ld hl,0dca4h ;; plus unlock sequence
1c9c 7e ld a,(hl)
1c9d ed79 out (c),a
1c9f 23 inc hl
1ca0 0d dec c
1ca1 20f9 jr nz,1c9ch
1ca3 c9 ret
 
;; plus unlock sequence
1ca4
defb &ff,&00,&ff,&77,&b3,&51,&a8,&d4,&62,&39,&9c,&46,&2b,&15,&8a,&cd,&ee
 
1cb5:
defw &07
defw &0f
defw &077f
defw &0fff
;; sprite pixels
1cbd
defb &1
;; &1cbe-&1dbc is 0
defs 254
 
1dbd 04 inc b
1dbe 00 nop
1dbf 010009 ld bc,0900h
1dc2 00 nop
1dc3 00 nop
1dc4 00 nop
1dc5 24 inc h
1dc6 00 nop
1dc7 010009 ld bc,0900h
2,562
edits