mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-13 07:29:54 +00:00
mockingboard: start working on this
This commit is contained in:
parent
b18f036f09
commit
25e0911b12
@ -3,18 +3,16 @@ include ../Makefile.inc
|
||||
DOS33 = ../dos33fs-utils/dos33
|
||||
PNG2GR = ../gr-utils/png2gr
|
||||
|
||||
all: dump_ed
|
||||
all: dump_ed mock.dsk
|
||||
|
||||
mock.dsk:
|
||||
$(DOS33) -y tfv.dsk BSAVE -a 0x1000 TFV
|
||||
$(DOS33) -y tfv.dsk BSAVE -a 0x400 TITLE.GR
|
||||
$(DOS33) -y tfv.dsk BSAVE -a 0x900 ED
|
||||
mock.dsk: MOCK_TEST
|
||||
$(DOS33) -y mock_test.dsk BSAVE -a 0x1000 MOCK_TEST
|
||||
|
||||
TFV: tfv.o
|
||||
ld65 -o TFV tfv.o -C ./apple2_1000.inc
|
||||
MOCK_TEST: mock_test.o
|
||||
ld65 -o MOCK_TEST mock_test.o -C ./apple2_1000.inc
|
||||
|
||||
tfv.o: tfv.s title.inc
|
||||
ca65 -o tfv.o tfv.s -l tfv.lst
|
||||
mock_test.o: mock_test.s
|
||||
ca65 -o mock_test.o mock_test.s -l mock_test.lst
|
||||
|
||||
ED: duet.o
|
||||
ld65 -o ED duet.o -C ./apple2_900.inc
|
||||
@ -22,9 +20,6 @@ ED: duet.o
|
||||
duet.o: duet.s
|
||||
ca65 -o duet.o duet.s -l duet.lst
|
||||
|
||||
TITLE.GR: title.png
|
||||
$(PNG2GR) title.png TITLE.GR
|
||||
|
||||
notes.o: notes.c
|
||||
$(CC) $(CFLAGS) -c notes.c
|
||||
|
||||
@ -36,5 +31,5 @@ dump_ed: dump_ed.o notes.o
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *~ TITLE.GR *.o *.lst ED
|
||||
rm -f *~ TITLE.GR *.o *.lst ED MOCK_TEST dump_ed
|
||||
|
||||
|
12
mockingboard/apple2_1000.inc
Normal file
12
mockingboard/apple2_1000.inc
Normal file
@ -0,0 +1,12 @@
|
||||
MEMORY {
|
||||
ZP: start = $00, size = $1A, type = rw;
|
||||
RAM: start = $1000, size = $8E00, file = %O;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
1853
mockingboard/ksptheme_uncompressed.inc
Normal file
1853
mockingboard/ksptheme_uncompressed.inc
Normal file
File diff suppressed because it is too large
Load Diff
BIN
mockingboard/mock_test.dsk
Normal file
BIN
mockingboard/mock_test.dsk
Normal file
Binary file not shown.
59
mockingboard/mock_test.s
Normal file
59
mockingboard/mock_test.s
Normal file
@ -0,0 +1,59 @@
|
||||
; http://macgui.com/usenet/?group=2&id=8366
|
||||
|
||||
; Mockingboad programming:
|
||||
; + Has two 6522 I/O chips
|
||||
; + Often in slot 4
|
||||
|
||||
; $C400 ORB1 function to perform, OUT 1
|
||||
; $C401 ORA1 data, OUT 1
|
||||
; $C402 DDRB1 data direction, OUT 1
|
||||
; $C403 DDRA1 data direction, OUT 1
|
||||
|
||||
; $C480 ORB2 function to perform, OUT 2
|
||||
; $C481 ORA2 data, OUT 2
|
||||
; $C482 DDRB2 data direction, OUT 2
|
||||
; $C483 DDRA2 data direction, OUT 2
|
||||
|
||||
; To Initialize the 6522s: Store $FF at the DDRxx addresses
|
||||
|
||||
; Your program gets access to a PSG via the 6522 by using a few basic
|
||||
; Function codes which set the PSG's I/O control lines:
|
||||
;
|
||||
; Set Inactive = $04 Set PSG Reg# = $07 Write Data = $06 Reset = $00
|
||||
;
|
||||
; To Write to a PSG register: Tell the PSG which Register you wish to access
|
||||
; (i.e. Set the "current register" #) and Write the data. This is easiest to
|
||||
; do with subroutines to handle the basic Functions.
|
||||
;
|
||||
; Example Subroutines (for Output Channel 1):
|
||||
;
|
||||
; Set Reg # 1000: A9 07 8D 00 C4 A9 04 8D 00 C4 60
|
||||
; Write Data 100B: A9 06 8D 00 C4 A9 04 8D 00 C4 60
|
||||
|
||||
; Notice that each Function sub ends by setting the PSG control lines to
|
||||
; Inactive.
|
||||
; Similarly, to do a Reset (set all PSG regs to zero) ...
|
||||
|
||||
; Reset 1016: A9 00 8D 00 C4 A9 04 8D 00 C4 60
|
||||
|
||||
; To put the value $55 in PSG Register 02 (Channel B Freq. fine) ....
|
||||
|
||||
; 1080: A9 02 put Reg# in A
|
||||
; 1082: 8D 01 C4 store A at the Data address ORA1
|
||||
; 1085: 20 00 10 JSR to Set Reg# (sets "current register" to Register
|
||||
; 2)
|
||||
; 1088: A9 55 put the value $55 in A
|
||||
; 108A: 8D 01 C4 store A at the Data address ORA1
|
||||
; 108D: 20 0B 10 JSR to Write Data ($55 goes into PSG Register 2)
|
||||
; 1090: 60 Exit from subroutine
|
||||
|
||||
.include "zp.inc"
|
||||
|
||||
;=============================
|
||||
; set low-res graphics, page 0
|
||||
;=============================
|
||||
jsr HOME
|
||||
jsr TEXT
|
||||
|
||||
forever_loop:
|
||||
jmp forever_loop
|
187
mockingboard/zp.inc
Normal file
187
mockingboard/zp.inc
Normal file
@ -0,0 +1,187 @@
|
||||
.define EQU =
|
||||
|
||||
;; Zero page monitor routines addresses
|
||||
|
||||
WNDLFT EQU $20
|
||||
WNDWDTH EQU $21
|
||||
WNDTOP EQU $22
|
||||
WNDBTM EQU $23
|
||||
CH EQU $24
|
||||
CV EQU $25
|
||||
GBASL EQU $26
|
||||
GBASH EQU $27
|
||||
BASL EQU $28
|
||||
BASH EQU $29
|
||||
H2 EQU $2C
|
||||
V2 EQU $2D
|
||||
MASK EQU $2E
|
||||
COLOR EQU $30
|
||||
INVFLG EQU $32
|
||||
|
||||
; More zero-page addresses
|
||||
; we try not to conflict with anything DOS, MONITOR or BASIC related
|
||||
|
||||
COLOR1 EQU $E0
|
||||
COLOR2 EQU $E1
|
||||
MATCH EQU $E2
|
||||
XX EQU $E3
|
||||
YY EQU $E4
|
||||
YADD EQU $E5
|
||||
LOOP EQU $E6
|
||||
MEMPTRL EQU $E7
|
||||
MEMPTRH EQU $E8
|
||||
NAMEL EQU $E9
|
||||
NAMEH EQU $EA
|
||||
NAMEX EQU $EB
|
||||
CHAR EQU $EC
|
||||
DISP_PAGE EQU $ED
|
||||
DRAW_PAGE EQU $EE
|
||||
|
||||
FIRST EQU $F0
|
||||
LASTKEY EQU $F1
|
||||
PADDLE_STATUS EQU $F2
|
||||
XPOS EQU $F3
|
||||
YPOS EQU $F4
|
||||
TEMP EQU $FA
|
||||
RUN EQU $FA
|
||||
TEMP2 EQU $FB
|
||||
TEMPY EQU $FB
|
||||
INL EQU $FC
|
||||
INH EQU $FD
|
||||
OUTL EQU $FE
|
||||
OUTH EQU $FF
|
||||
|
||||
|
||||
;; Flying Routine Only
|
||||
|
||||
TURNING EQU $60
|
||||
;SCREEN_X EQU $61 ; not used?
|
||||
SCREEN_Y EQU $62
|
||||
ANGLE EQU $63
|
||||
HORIZ_SCALE_I EQU $64
|
||||
HORIZ_SCALE_F EQU $65
|
||||
FACTOR_I EQU $66
|
||||
FACTOR_F EQU $67
|
||||
DX_I EQU $68
|
||||
DX_F EQU $69
|
||||
SPACEX_I EQU $6A
|
||||
SPACEX_F EQU $6B
|
||||
CX_I EQU $6C
|
||||
CX_F EQU $6D
|
||||
DY_I EQU $6E
|
||||
DY_F EQU $6F
|
||||
SPACEY_I EQU $70
|
||||
SPACEY_F EQU $71
|
||||
CY_I EQU $72
|
||||
CY_F EQU $73
|
||||
TEMP_I EQU $74
|
||||
TEMP_F EQU $75
|
||||
DISTANCE_I EQU $76
|
||||
DISTANCE_F EQU $77
|
||||
SPACEZ_I EQU $78
|
||||
SPACEZ_F EQU $79
|
||||
DRAW_SPLASH EQU $7A
|
||||
SPEED EQU $7B
|
||||
SPLASH_COUNT EQU $7C
|
||||
OVER_LAND EQU $7D
|
||||
NUM1L EQU $7E
|
||||
NUM1H EQU $7F
|
||||
NUM2L EQU $80
|
||||
NUM2H EQU $81
|
||||
RESULT EQU $82 ; 83,84,85
|
||||
NEGATE EQU $86 ; UNUSED?
|
||||
LAST_SPACEX_I EQU $87
|
||||
LAST_SPACEY_I EQU $88
|
||||
LAST_MAP_COLOR EQU $89
|
||||
DRAW_SKY EQU $8A
|
||||
COLOR_MASK EQU $8B
|
||||
KEY_COUNT EQU $8C
|
||||
KEY_OFFSET EQU $8D
|
||||
DRAW_BLUE_SKY EQU $8E
|
||||
RANDOM_POINTER EQU $8F
|
||||
FRAME_COUNT EQU $90
|
||||
|
||||
SHIPY EQU $E4
|
||||
|
||||
KEYPRESS EQU $C000
|
||||
KEYRESET EQU $C010
|
||||
|
||||
;; SOFT SWITCHES
|
||||
CLR80COL EQU $C000 ; PAGE0/PAGE1 normal
|
||||
SET80COL EQU $C001 ; PAGE0/PAGE1 switches PAGE0 in Aux instead
|
||||
EIGHTYCOL EQU $C00D
|
||||
SPEAKER EQU $C030
|
||||
SET_GR EQU $C050
|
||||
SET_TEXT EQU $C051
|
||||
FULLGR EQU $C052
|
||||
TEXTGR EQU $C053
|
||||
PAGE0 EQU $C054
|
||||
PAGE1 EQU $C055
|
||||
LORES EQU $C056 ; Enable LORES graphics
|
||||
HIRES EQU $C057 ; Enable HIRES graphics
|
||||
AN3 EQU $C05E ; Annunciator 3
|
||||
|
||||
PADDLE_BUTTON0 EQU $C061
|
||||
PADDL0 EQU $C064
|
||||
PTRIG EQU $C070
|
||||
|
||||
;; BASIC ROUTINES
|
||||
|
||||
NORMAL EQU $F273
|
||||
|
||||
;; MONITOR ROUTINES
|
||||
|
||||
HLINE EQU $F819 ;; HLINE Y,$2C at A
|
||||
VLINE EQU $F828 ;; VLINE A,$2D at Y
|
||||
CLRSCR EQU $F832 ;; Clear low-res screen
|
||||
CLRTOP EQU $F836 ;; clear only top of low-res screen
|
||||
SETCOL EQU $F864 ;; COLOR=A
|
||||
TEXT EQU $FB36
|
||||
TABV EQU $FB5B ;; VTAB to A
|
||||
BASCALC EQU $FBC1 ;;
|
||||
VTAB EQU $FC22 ;; VTAB to CV
|
||||
HOME EQU $FC58 ;; Clear the text screen
|
||||
WAIT EQU $FCA8 ;; delay 1/2(26+27A+5A^2) us
|
||||
SETINV EQU $FE80 ;; INVERSE
|
||||
SETNORM EQU $FE84 ;; NORMAL
|
||||
COUT EQU $FDED ;; output A to screen
|
||||
COUT1 EQU $FDF0 ;; output A to screen
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
COLOR_BLACK EQU 0
|
||||
COLOR_RED EQU 1
|
||||
COLOR_DARKBLUE EQU 2
|
||||
COLOR_PURPLE EQU 3
|
||||
COLOR_DARKGREEN EQU 4
|
||||
COLOR_GREY EQU 5
|
||||
COLOR_MEDIUMBLUE EQU 6
|
||||
COLOR_LIGHTBLUE EQU 7
|
||||
COLOR_BROWN EQU 8
|
||||
COLOR_ORANGE EQU 9
|
||||
COLOR_GREY2 EQU 10
|
||||
COLOR_PINK EQU 11
|
||||
COLOR_LIGHTGREEN EQU 12
|
||||
COLOR_YELLOW EQU 13
|
||||
COLOR_AQUA EQU 14
|
||||
COLOR_WHITE EQU 15
|
||||
|
||||
COLOR_BOTH_RED EQU $11
|
||||
COLOR_BOTH_DARKBLUE EQU $22
|
||||
COLOR_BOTH_DARKGREEN EQU $44
|
||||
COLOR_BOTH_GREY EQU $55
|
||||
COLOR_BOTH_MEDIUMBLUE EQU $66
|
||||
COLOR_BOTH_LIGHTBLUE EQU $77
|
||||
COLOR_BOTH_BROWN EQU $88
|
||||
COLOR_BOTH_ORANGE EQU $99
|
||||
COLOR_BOTH_PINK EQU $BB
|
||||
COLOR_BOTH_LIGHTGREEN EQU $CC
|
||||
COLOR_BOTH_YELLOW EQU $DD
|
||||
COLOR_BOTH_AQUA EQU $EE
|
||||
COLOR_BOTH_WHITE EQU $FF
|
||||
|
||||
AUX_BOTH_MEDIUMBLUE EQU $33 ; 0011 0011
|
||||
AUX_BOTH_GREY EQU $AA ; 1010 1010
|
Loading…
x
Reference in New Issue
Block a user