Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
builderpages:plasmo:zzrcc:cpldrom [2020/12/16 08:14]
plasmo
builderpages:plasmo:zzrcc:cpldrom [2020/12/18 08:43] (current)
plasmo
Line 6: Line 6:
  
 <code> <code>
-;12/5/20+;12/18/20
 ;32-byte ROM inside CPLD ;32-byte ROM inside CPLD
-;check for CF disk not busy, then read the master boot record to 0xB000 +;check for CF disk not busy, then read the master boot record to 0xB080 
-;  execute the program starting from 0xB000+;  execute the program starting from 0xB080
 CFdata       equ 010h        ;CF data register CFdata       equ 010h        ;CF data register
 CFerr        equ 011h        ;CF error reg CFerr        equ 011h        ;CF error reg
Line 20: Line 20:
  
     org 0     org 0
-    nop +    ld c,8        ;point to I/O page register 
-    nop +    ld l,0        ;CF is in page 0 
-    nop +    db 0edh,6eh    ;op code for LDCTL (C),HL 
-    ld hl,0b000h    ;bootstrap code starts from 0xb000+
 ; check for disk not busy ; check for disk not busy
 readbsy: readbsy:
     in a,(CFstat)    ; read CF status     in a,(CFstat)    ; read CF status
-    and 80h        ; mask off all except busy bit +    rla 
-    jr nz,readbsy +    jr c,readbsy 
-;reg A is already 0 +; do not need to set up sector/track and sector count because 
-    ld b,a        ;make reg B zero + they are set by default after reset
-;; do not need to set up sector/track and sector count because +
-;;   they are set by default after reset+
 ;    out (CF1623),   ; track 0 ;    out (CF1623),   ; track 0
 ;    out (CF815),a ;    out (CF815),a
Line 47: Line 45:
     jr z,chkdrq     jr z,chkdrq
  
-    inir        ;z80 read 256 bytes +    ld c,CFdata 
-    jp 0b000h         ;execute loaded program +    ld hl,0b080h      ;copy program to 0xB080 
- +    ld b,l 
-    end+    inir        ;z80 read 128 bytes 
 +    jp 0b080h
 </code> </code>
  
  
builderpages/plasmo/zzrcc/cpldrom.1608124461.txt.gz · Last modified: 2020/12/16 08:14 by plasmo
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0