; ; Firmware for Ciarcia's Z8000 Trump Card boot ROM. ; Assembles online at asm80.com ; ; 2023-02-07 OCR'd from magazine page scan to create this file. ; ; "bucket" refers to the simple input buffer, which is a 2K RAM with a counter driving the address lines. ; .cpu z80 ; It isn't a z80, but you have to specify something. ; ; The Z8000 is little-endian. ; You need to split the output into odd and even bytes for two separate ROM chips. ; The Trump Card boots through an 8-bit PC bus interface. ; Which is well obsolete in 2023, you may be better off writing a boot ROM ; that boots through an FTDI USB FIFO interface module. ; .dw $0000 ;00 DW $0000 ; Reserved control word .dw $D000 ;02 DW $D000 ; Flag and control word .dw $0000 ;04 DW $0000 ; Segment Register Segment Offset .dw $000B ;06 DW $000B ; Set refresh freq and enable .dw $2100,$9E01 ;08 LD R0, #%9E01 ; Set refresh freq and enable .dw $1404,$0003,$0001 ;0C LDL RR4,#%0003 0001 ; Set port addresses .dw $7D0B ;12 LDCTL REFRESH, R0 ; Load refresh value .dw $3E40 ;14 OUTB @R4, RH0 ; Set R4 as reset-bucket port .dw $3C40 ;16 INB RH0, @R4 ; Read bucket without increment .dw $A800 ;18 INCB RH0, #1 ; Increment input value .dw $E6FC ;1A JR 0 EQ,%0014 ; Repeat if equal to 0 .dw $3C40 ;1C INB RH0, @R4 ; Read bucket .dw $8A80 ;1E CPB RH0, RL0 ; Compare bucket value to 01 .dw $EFF9 ;20 JR NC UGE, %0014 ; Do again if not > 01 .dw $C803 ;22 LDB RL0, #%03 ; Load R0 with bucket available # .dw $3E58 ;24 OUTB @R5, RL0 ; Load bucket with R0 .dw $8400 ;26 ORB RH0, RH0 ; Set zero flag if RH0 is 0 .dw $E6F5 ;28 JR Z EQ,%0014 ; Restart boot, else continue .dw $3C52 ;2A INB RH2, @R5 ; Read bucket and save in register .dw $3C53 ;2C INB RH3, @R5 ; Read bucket and save in register .dw $3C5B ;2E INB RL3, @R5 ; Read bucket and save in register .dw $3C51 ;30 INB RH1, @R5 ; Read bucket and save in register .dw $3C59 ;32 IND RL1, @R5 ; Read bucket and save in register .dw $3A50,$0120 ;34 INIRB @RR2, @R5 R1 ; Read bucket into memory .dw $F013 ;38 DBZNZ RH0 ; Decrement RH0 and at 0 goto 0014 .dw $3E40 ;3A OUTB @R4, RH0 ; Reset bucket .dw $AB35 ;3C DEC R3, #6 ; Decrement value in R3 six times ; to set up first addr of code .dw $1E28 ;3E JP @RR2 ; Jump to loc defined in RR2