diff --git a/README.md b/README.md index 14ff9c7..3e2d19f 100644 --- a/README.md +++ b/README.md @@ -21,4 +21,4 @@ Prototype 1 is currently in progress. It will be a much simpler system. It will ## License -This project is licensed under the MIT license. This applies to both the hardware (schematics, bill of materials, pcb layouts) and documentation. This does *not* apply to the datasheets/ directory, the code/books/ directory or code/assist09.asm. Those files belong to their respective copyright holders. +This project is licensed under the MIT license. This applies to both the hardware (schematics, bill of materials, pcb layouts) and documentation. This does *not* apply to the datasheets/ directory, the books/ directory or code/assist09/assist09.asm. Those files belong to their respective copyright holders. diff --git a/code/books/Motorola 6809 and Hitachi 6309 Programming Reference (Darren Atkinson).pdf b/books/Motorola 6809 and Hitachi 6309 Programming Reference (Darren Atkinson).pdf similarity index 100% rename from code/books/Motorola 6809 and Hitachi 6309 Programming Reference (Darren Atkinson).pdf rename to books/Motorola 6809 and Hitachi 6309 Programming Reference (Darren Atkinson).pdf diff --git a/code/books/as11v2.pdf b/books/as11v2.pdf similarity index 100% rename from code/books/as11v2.pdf rename to books/as11v2.pdf diff --git a/books/manual.pdf b/books/manual.pdf new file mode 100644 index 0000000..68a6493 Binary files /dev/null and b/books/manual.pdf differ diff --git a/code/README.md b/code/README.md index d3e7fb0..d59147d 100644 --- a/code/README.md +++ b/code/README.md @@ -1,5 +1,13 @@ # Code +## assist09/ + assist09.asm is the original motorola version, and relies on the as9 assembler found [here](http://home.hccnet.nl/a.w.m.van.der.horst/m6809.html). assemble.sh will assemble assist09.asm to an s19 file and use gnu binutils objcopy to turn that into a bin file. + +## boot/ + +the boot code for prototype 1, uses the lwtools assembler. + +assemble.sh will assemble boot.s to an s19 file and use gnu binutils objcopy to turn that into a bin file. diff --git a/code/assemble.sh b/code/assist09/assemble-assist09.sh similarity index 100% rename from code/assemble.sh rename to code/assist09/assemble-assist09.sh diff --git a/code/assist09.asm b/code/assist09/assist09.asm similarity index 100% rename from code/assist09.asm rename to code/assist09/assist09.asm diff --git a/code/boot.asm b/code/boot.asm deleted file mode 100644 index e69de29..0000000 diff --git a/code/boot/assemble.sh b/code/boot/assemble.sh new file mode 100755 index 0000000..ed9b2b3 --- /dev/null +++ b/code/boot/assemble.sh @@ -0,0 +1,3 @@ +lwasm --format=srec --output=boot.s19 boot.s +objcopy --input-target=srec --output-target=binary boot.s19 boot.bin +#mot2bin -out boot.bin boot.s19 diff --git a/code/boot/boot.bin b/code/boot/boot.bin new file mode 100644 index 0000000..fd10abc Binary files /dev/null and b/code/boot/boot.bin differ diff --git a/code/boot/boot.ld b/code/boot/boot.ld new file mode 100644 index 0000000..e794299 --- /dev/null +++ b/code/boot/boot.ld @@ -0,0 +1,3 @@ +section code load 8000 +pad FFFF +section vectors load FFF0 diff --git a/code/boot/boot.s b/code/boot/boot.s new file mode 100644 index 0000000..e979341 --- /dev/null +++ b/code/boot/boot.s @@ -0,0 +1,44 @@ +; CHIBI PC-09 Prototype #1 Boot ROM +; (Copyright (c) 2024 Amber Zeller + +; UART registers +UART = $7F00 + +; When DLAB = 0 +BUFR = UART ; TX/RX Buffer (Read for RX, Write for TX) +IER = UART + 1 ; Interrupt Enable Register +IIR = UART + 1 ; Interrupt Enable Register (Upon Read) +; When DLAB = 1 +DLL = UART ; Divisor Latch (LSB) +DLM = UART + 1 ; Divisor Latch (MSB) + +FCR = UART + 2 ; FIFO Control Register (Upon Write) +LCR = UART + 3 ; Line Control Register +MCR = UART + 4 ; MODEM Control Register +LSR = UART + 5 ; Line Status Register +MSR = UART + 6 ; MODEM Status Register +SCR = UART + 7 ; Scratch Register (Not for control just spare RAM) + +; SECTION code + + org $8000 + +RESET: + sta $cc + jmp RESET + fdb RESET + +; ENDSECTION + +; SECTION vectors + org $FFF0 + ; Reset/Interrupt Vectors + fdb $0000 ; Reserved + fdb $0000 ; SWI3 + fdb $0000 ; SWI2 + fdb $0000 ; FIRQ + fdb $0000 ; IRQ + fdb $0000 ; SWI + fdb $0000 ; NMI + fdb RESET ; Reset +; ENDSECTION diff --git a/code/boot/boot.s19 b/code/boot/boot.s19 new file mode 100644 index 0000000..1888edf --- /dev/null +++ b/code/boot/boot.s19 @@ -0,0 +1,5 @@ +S01800005B6C77746F6F6C7320342E32335D20626F6F742E73BF +S10A800097CC7E8000800094 +S113FFF0000000000000000000000000000080007D +S5030002FA +S9030000FC diff --git a/code/boot/devenvironment.md b/code/boot/devenvironment.md new file mode 100644 index 0000000..526eb1b --- /dev/null +++ b/code/boot/devenvironment.md @@ -0,0 +1,10 @@ +# Dev environment + +USE: + +- [lwtools](http://www.lwtools.ca/) +- [f9dasm](https://github.com/Arakula/f9dasm) + +lwtools uses lwasm + +f9dasm uses f9dasm diff --git a/docs/prototype-1-specs.md b/docs/prototype-1-specs.md index 1631505..b37e105 100644 --- a/docs/prototype-1-specs.md +++ b/docs/prototype-1-specs.md @@ -1,15 +1,15 @@ # 6309 Board Prototype #1 Specs HD63C09 CPU @ 3MHz -HM62256BLP-7 SRAM -AT28C256-15 EEPROM -ST16C550 UART @ 1.8342MHz (XO due to lack of 22pf 1.8432MHz XTALs) +AS6C62256-55 SRAM (32KB) +SST39SF010A-70 FLASH (32KB Used) +PC16550 UART @ 1.8342MHz ## Memory Map | Device | Location | |--------|-----------| -| EEPROM | 8000-FFFF | +| FLASH | 8000-FFFF | | UART | 7F00-7FFF | | SRAM | 0000-7EFF | @@ -17,6 +17,6 @@ ST16C550 UART @ 1.8342MHz (XO due to lack of 22pf 1.8432MHz XTALs) | A15 | A14-A9 | A8 | Chip | |-----|--------|----|--------| -| H | x | x | EEPROM | +| H | x | x | FLASH | | L | x | L | SRAM | | L | H | H | UART | \ No newline at end of file