Browse Source

added script to build most source; minimal build fixes

pull/5/head
Michael Steil 4 years ago
parent
commit
6aa1f73fa5
  1. 2
      .gitignore
  2. 2
      BASIC_CBM2_B/contrl
  3. 2
      CONTROLLER_8250/lib
  4. 4
      DOS_1540/ser.lib
  5. 4
      DOS_1541C_01_REC/ser.lib
  6. 2
      DOS_1541C_02/block.src
  7. 8
      DOS_1541C_02_REC/rom....sf
  8. 4
      DOS_1541C_02_REC/ser.lib
  9. 10
      DOS_1541C_03_REC/rom....sf
  10. 4
      DOS_1541C_03_REC/ser.lib
  11. 4
      DOS_1541_01_REC/ser.lib
  12. 4
      DOS_1541_02_REC/ser.lib
  13. 4
      DOS_1541_03_REC/ser.lib
  14. 2
      DOS_1541_05/block.src
  15. 4
      DOS_1541_05_REC/ser.lib
  16. 4
      DOS_1541_06_REC/ser.lib
  17. 2
      DOS_1551/blo.src
  18. 2
      DOS_4040/master
  19. 2
      DOS_8070/dos
  20. 2
      DOS_8250/master
  21. 0
      DOS_8250/ramvar
  22. 0
      DOS_8250/system
  23. 2
      DOS_D9065/master
  24. 2
      KERNAL_C64_01/kernal
  25. 2
      KERNAL_C64_03/editor.3
  26. 2
      KERNAL_C64_03/kernal
  27. 2
      KERNAL_C64_03/open
  28. 2
      README.md
  29. 125
      build.sh

2
.gitignore vendored

@ -0,0 +1,2 @@
build
assembler64.prg

2
BASIC_CBM2_B/contrl

@ -452,7 +452,7 @@ XEQCM2
BCC NSTT6
CMP #TKGO-TKEND
BCC SNERR1
CMP #TKUSING-TKEND ;PATCH REV4 FIXES USING C/R***********
CMP #TKUSIN-TKEND ;PATCH REV4 FIXES USING C/R***********
BCS SNERR1 ;TRAP USING, ERR$ & INSTR$
SBC #TKGO-TKSCRA-2
NSTT6 ASL A

2
CONTROLLER_8250/lib

@ -2,7 +2,7 @@
.LIB CONTLR
.LIB DEFST
.LIB MAIN
.LIB R/W
.LIB R_W
.LIB CMDS
.LIB IRQ
.LIB VECTORS

4
DOS_1540/ser.lib

@ -1,7 +1,7 @@
.LIB COMMON
.LIB LCC.VAR
.LIB EQUATE.SF
.LIB I/ODEF.SF
.LIB I_ODEF.SF
.LIB RAMVAR.SF
.LIB ROM....SF
.LIB LEDS
@ -54,7 +54,7 @@
.LIB TSTFND
.LIB SYSTEM
.PAGE 'CONTROLLER'
.LIB LCC.I/O
.LIB LCC.I_O
.LIB LCC.INIT
.LIB LCC.CNTRL
.LIB LCC.SEEK

4
DOS_1541C_01_REC/ser.lib

@ -1,7 +1,7 @@
.LIB COMMON
.LIB LCC.VAR
.LIB EQUATE.SF
.LIB I/ODEF.SF
.LIB I_ODEF.SF
.LIB RAMVAR.SF
.LIB ROM....SF
.LIB LEDS
@ -54,7 +54,7 @@
.LIB TSTFND
.LIB SYSTEM
.PAGE 'CONTROLLER'
.LIB LCC.I/O
.LIB LCC.I_O
.LIB LCC.INIT
.LIB LCC.CNTRL
.LIB LCC.SEEK

2
DOS_1541C_02/block.src

@ -169,7 +169,7 @@ blkpar ldy #0 ; parse block parms
ldy #3 ; else char #3 is beginning
bp05 lda cmdbuf,y
cmp #'
cmp #' '
beq bp10
cmp #29 ; skip character

8
DOS_1541C_02_REC/rom....sf

@ -21,10 +21,10 @@ CLEAR LDA PCR2 ; ENABLE WRITE
CLER10 BVC *
CLV
DEY
BNE XLER10
BNE CLER10
;
DEX
BNE XLER10
BNE CLER10
;
RTS
;
@ -84,8 +84,8 @@ PTH661 LDA #1
; TRACK CUTOFFS
TRACKN .BYTE 41,31,25,18
;
.BYTE "COPYRIGHT (C)1985 COMMODORE ELECTRONICS, LTD.", CR
.BYTE "ALL RIGHTS RESERVED", CR
.BYTE 'COPYRIGHT (C)1985 COMMODORE ELECTRONICS, LTD.', CR
.BYTE 'ALL RIGHTS RESERVED', CR
;
FREEC0 *=*+103 ; C0 PATCH SPACE
.END

4
DOS_1541C_02_REC/ser.lib

@ -1,7 +1,7 @@
.LIB COMMON
.LIB LCC.VAR
.LIB EQUATE.SF
.LIB I/ODEF.SF
.LIB I_ODEF.SF
.LIB RAMVAR.SF
.LIB ROM....SF
.LIB LEDS
@ -54,7 +54,7 @@
.LIB TSTFND
.LIB SYSTEM
.PAGE 'CONTROLLER'
.LIB LCC.I/O
.LIB LCC.I_O
.LIB LCC.INIT
.LIB LCC.CNTRL
.LIB LCC.SEEK

10
DOS_1541C_03_REC/rom....sf

@ -5,8 +5,8 @@ CCHKSM .BYTE 0
;
.BYTE $E0
;
.BYTE "COPYRIGHT (C)1982,1985,1987 COMMODORE ELECTRONICS, LTD.", CR
.BYTE "ALL RIGHTS RESERVED", CR
.BYTE 'COPYRIGHT (C)1982,1985,1987 COMMODORE ELECTRONICS, LTD.', CR
.BYTE 'ALL RIGHTS RESERVED', CR
;
CLEAR LDA PCR2 ; ENABLE WRITE
AND #$FF-$E0
@ -24,10 +24,10 @@ CLEAR LDA PCR2 ; ENABLE WRITE
CLER10 BVC *
CLV
DEY
BNE XLER10
BNE CLER10
;
DEX
BNE XLER10
BNE CLER10
;
RTS
;
@ -36,7 +36,7 @@ CLER10 BVC *
; PATCH 15 *ROM DS 01/21/85*
;
PTCH15 LDY LINDX
JMP RNDGET2
JMP RNGET2
;
;
;----------------------------------------------------

4
DOS_1541C_03_REC/ser.lib

@ -1,7 +1,7 @@
.LIB COMMON
.LIB LCC.VAR
.LIB EQUATE.SF
.LIB I/ODEF.SF
.LIB I_ODEF.SF
.LIB RAMVAR.SF
.LIB ROM....SF
.LIB LEDS
@ -54,7 +54,7 @@
.LIB TSTFND
.LIB SYSTEM
.PAGE 'CONTROLLER'
.LIB LCC.I/O
.LIB LCC.I_O
.LIB LCC.INIT
.LIB LCC.CNTRL
.LIB LCC.SEEK

4
DOS_1541_01_REC/ser.lib

@ -1,7 +1,7 @@
.LIB COMMON
.LIB LCC.VAR
.LIB EQUATE.SF
.LIB I/ODEF.SF
.LIB I_ODEF.SF
.LIB RAMVAR.SF
.LIB ROM....SF
.LIB LEDS
@ -54,7 +54,7 @@
.LIB TSTFND
.LIB SYSTEM
.PAGE 'CONTROLLER'
.LIB LCC.I/O
.LIB LCC.I_O
.LIB LCC.INIT
.LIB LCC.CNTRL
.LIB LCC.SEEK

4
DOS_1541_02_REC/ser.lib

@ -1,7 +1,7 @@
.LIB COMMON
.LIB LCC.VAR
.LIB EQUATE.SF
.LIB I/ODEF.SF
.LIB I_ODEF.SF
.LIB RAMVAR.SF
.LIB ROM....SF
.LIB LEDS
@ -54,7 +54,7 @@
.LIB TSTFND
.LIB SYSTEM
.PAGE 'CONTROLLER'
.LIB LCC.I/O
.LIB LCC.I_O
.LIB LCC.INIT
.LIB LCC.CNTRL
.LIB LCC.SEEK

4
DOS_1541_03_REC/ser.lib

@ -1,7 +1,7 @@
.LIB COMMON
.LIB LCC.VAR
.LIB EQUATE.SF
.LIB I/ODEF.SF
.LIB I_ODEF.SF
.LIB RAMVAR.SF
.LIB ROM....SF
.LIB LEDS
@ -54,7 +54,7 @@
.LIB TSTFND
.LIB SYSTEM
.PAGE 'CONTROLLER'
.LIB LCC.I/O
.LIB LCC.I_O
.LIB LCC.INIT
.LIB LCC.CNTRL
.LIB LCC.SEEK

2
DOS_1541_05/block.src

@ -169,7 +169,7 @@ blkpar ldy #0 ; parse block parms
ldy #3 ; else char #3 is beginning
bp05 lda cmdbuf,y
cmp #'
cmp #' '
beq bp10
cmp #29 ; skip character

4
DOS_1541_05_REC/ser.lib

@ -1,7 +1,7 @@
.LIB COMMON
.LIB LCC.VAR
.LIB EQUATE.SF
.LIB I/ODEF.SF
.LIB I_ODEF.SF
.LIB RAMVAR.SF
.LIB ROM....SF
.LIB LEDS
@ -54,7 +54,7 @@
.LIB TSTFND
.LIB SYSTEM
.PAGE 'CONTROLLER'
.LIB LCC.I/O
.LIB LCC.I_O
.LIB LCC.INIT
.LIB LCC.CNTRL
.LIB LCC.SEEK

4
DOS_1541_06_REC/ser.lib

@ -1,7 +1,7 @@
.LIB COMMON
.LIB LCC.VAR
.LIB EQUATE.SF
.LIB I/ODEF.SF
.LIB I_ODEF.SF
.LIB RAMVAR.SF
.LIB ROM....SF
.LIB LEDS
@ -54,7 +54,7 @@
.LIB TSTFND
.LIB SYSTEM
.PAGE 'CONTROLLER'
.LIB LCC.I/O
.LIB LCC.I_O
.LIB LCC.INIT
.LIB LCC.CNTRL
.LIB LCC.SEEK

2
DOS_1551/blo.src

@ -170,7 +170,7 @@ blkpar ldy #0 ; parse block parms
ldy #3 ; else char #3 is beginning
bp05 lda cmdbuf,y
cmp #'
cmp #' '
beq bp10
cmp #29 ; skip character

2
DOS_4040/master

@ -1,6 +1,6 @@
.LIB DOS
.LIB EQUATE
.LIB I/ODEF
.LIB I_ODEF
.LIB RAMVAR
.LIB ROMTBL
.LIB DSKINT

2
DOS_8070/dos

@ -29,7 +29,7 @@
.PAG 'MEMORY MAP'
.LIB MEMMAP
.PAG 'I/O DEFINITIONS'
.LIB I/ODEF
.LIB I_ODEF
.PAG 'I/O DEFINITIONS'
.LIB IODEFS
.PAG 'EQUATES'

2
DOS_8250/master

@ -4,7 +4,7 @@
.LIB SIDSEC
.LIB SSS
.LIB EQUATE
.LIB I/ODEF
.LIB I_ODEF
.LIB RAMVAR
.LIB ROM
.LIB BEGIN

0
DOS_8250/ramvar.sd → DOS_8250/ramvar

0
DOS_8250/system.sd → DOS_8250/system

2
DOS_D9065/master

@ -4,7 +4,7 @@
.LIB SIDSEC
.LIB SSS
.LIB EQUATE
.LIB I/ODEF
.LIB I_ODEF
.LIB RAMVAR
.LIB ROM
.LIB BEGIN

2
KERNAL_C64_01/kernal

@ -5,7 +5,7 @@
;.LIB CONKAT (JAPAN CONVERSION TABLES)
.LIB EDITOR.2
.LIB EDITOR.3
.LIB SERIAL???
.LIB SERIAL4.0
.LIB RS232TRANS
.LIB RS232RCVR
.LIB RS232INOUT

2
KERNAL_C64_03/editor.3

@ -135,7 +135,7 @@ CONTRL
.BYT $FF ;END OF TABLE NULL
TVIC
.BYT 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;SPRITES (0-16)
.BYT $9B,55,0,0,0,$08,0,$14,$0f,0,0,0,0,0,0 ;DATA (17-31) RC=311
.BYT $9B,55,0,0,0,$08,0,$14,$0F,0,0,0,0,0,0 ;DATA (17-31) RC=311
.BYT 14,6,1,2,3,4,0,1,2,3,4,5,6,7 ;32-46
;
RUNTB .BYT 'LOAD',$D,'RUN',$D

2
KERNAL_C64_03/kernal

@ -5,7 +5,7 @@
;.LIB CONKAT (JAPAN CONVERSION TABLES)
.LIB EDITOR.2
.LIB EDITOR.3
.LIB SERIAL???
.LIB SERIAL4.0
.LIB RS232TRANS
.LIB RS232RCVR
.LIB RS232INOUT

2
KERNAL_C64_03/open

@ -208,7 +208,7 @@ OPN026 LDY BAUDOP-1,X ;PAL STANDARD
OPN027 STY M51AJB+1 ;HOLD START RATE IN M51AJB
STA M51AJB
OPN028 LDA M51AJB ;CALCULATE BAUD RATE
ASL
ASL A
JSR POPEN ;GOTO PATCH AREA
;
; CHECK FOR 3/X LINE RESPONSE

2
README.md

@ -136,7 +136,7 @@ The CBM D9065 DOS V3.0 source (1981). Extracted from old-dos-sources.d81 from St
## DOS_1540
The Commodore 1540 DOS V2.6 source (1980), 325302-01/325303-01. Extracted from 1541-2031-num1.d64 and 1541-2031-source-disk-copy-num2-side1.d64 from Steve Gray's [Dennis Jarvis Page](http://6502.org/users/sjgray/dj/) and converted to LF line breaks and LST-style indenting.
The Commodore 1540 DOS V2.6 source (1980), 325302-01/325303-01. Extracted from 1541-2031-copy-1-original-side1.d64/1541-2031-num1.d64 and 1541-2031-source-disk-copy-num2-side1.d64 from Steve Gray's [Dennis Jarvis Page](http://6502.org/users/sjgray/dj/) and converted to LF line breaks and LST-style indenting.
* The source contains both the IEEE-488 and the IEC serial interface code, so it represents both the CBM 2031 and the Commodore 1540. Different `master` source files build different configurations.
* The power-on message always says "`CBM DOS V2.6 V170`" though, which corresponds to the 1540.

125
build.sh

@ -0,0 +1,125 @@
# This script will build most of the source in this repository.
# The directory "build" will contain the LST and OBJ files for each project.
KERNALEMU=kernalemu
CBM6502ASM=asm
ASSEMBLER64=assembler64.prg
test_tools()
{
if ! command -v $KERNALEMU &> /dev/null
then
echo "Please get https://github.com/mist64/kernalemu and install it in your PATH."
exit
fi
if ! command -v $CBM6502ASM &> /dev/null
then
echo "Please get https://github.com/mist64/cbm6502asm and install it in your PATH."
exit
fi
if [ ! -f assembler64.prg ]; then
echo "Please get assembler64.prg from https://github.com/mist64/kernalemu/tree/main/demo."
exit
fi
}
build1()
{
DIR=$1
SRC=$2
mkdir build/$DIR
for i in $DIR/*; do cat $i | sed -e "s/\.NLIST//" | tr '\n' '\r' | tr '\t' ' ' > build/$i; done
cd build/$DIR
echo "_tmp_obj\n\n\n$SRC" | $KERNALEMU ../../$ASSEMBLER64
mv printer4.txt ../$1.lst
tr '\r' '\n' < _tmp_obj > ../$1.obj
cd ../..
rm -rf build/$DIR
}
build2()
{
DIR=$1
SRC=$2
cp -pr $DIR build/
cd build/$DIR
$CBM6502ASM _tmp_obj,_tmp_lst=$SRC
mv _tmp_lst.lst ../$1.lst
mv _tmp_obj.obj ../$1.obj
cd ../..
rm -rf build/$DIR
}
test_tools
rm -rf build
mkdir build
build1 KERNAL_VIC_04 kernal
build1 KERNAL_C64_01 kernal
build1 KERNAL_C64_03 kernal
build2 KERNAL_C64_03_VAX kernal
build2 KERNAL_C64GS console
build2 KERNAL_C128_03 kernal
build2 KERNAL_C128_05 kernal
build2 KERNAL_C128_06 kernal
build1 KERNAL_CBM2_A kernal
build1 KERNAL_CBM2_B kernal
build2 EDITOR_C128 editor
build2 EDITOR_C128_DIN editor
build1 EDITOR_CBM2 sced.lib
build1 BASIC_VIC basic
build1 BASIC_C64 basic
build2 BASIC_C64_VAX basic
build2 BASIC_C64GS basic
build2 BASIC_TED basic
build2 BASIC_C128 basic
build1 BASIC_CBM2_A cbm256 # or cbm128
build1 BASIC_CBM2_B cbm256 # cbm128 cbm192 cbm256 cbm64 pet128 pet192 pet256 pet64
build1 CONTROLLER_8250 lib
build1 DOS_4040 master
build1 DOS_1540 ser.lib
build1 DOS_1541_01_REC ser.lib
build1 DOS_1541_02_REC ser.lib
build1 DOS_1541_03_REC ser.lib
build1 DOS_1541_05_REC ser.lib
build1 DOS_1541_06_REC ser.lib
build1 DOS_1541C_01_REC ser.lib
build1 DOS_1541C_02_REC ser.lib
build1 DOS_1541C_03_REC ser.lib
build1 DOS_8250 master
build1 DOS_8070 dos
build1 DOS_D9065 master
build2 DOS_1551 d1551
build2 DOS_1541_05 1541
build2 DOS_1541C_02 serlib
build2 DOS_1541C_03 serlib
# TODO cbm6502asm problems:
# * problem with include that doesn't return to parent file
# DOS_1570
# DOS_1571_03
# DOS_1571_05
# DOS_1571CR
# DOS_1581
# * problems with palmod symbol, ';' literal
# build2 KERNAL_TED_04 kernal
# * problems with ';' literal
# build2 MONITOR_C128 monitor
# * build problem
# build2 RAMDOS a
Loading…
Cancel
Save