Skip to content

Commit

Permalink
ZIPCHIP.SYSTEM - log cache size
Browse files Browse the repository at this point in the history
  • Loading branch information
inexorabletash committed Nov 12, 2023
1 parent 93e4878 commit 764b4bd
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions accelerators/zipchip/zipchip.system.s
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@

ZC_REG_ENABLE := $C05B
;; Write - Any hex byte written will enable ZIP CHIP
;;

ZC_REG_STATUS := $C05B
;; Read - Read the current status of the following:
;; bit 0 & 1 - Ramsize where
;; RAMSIZE1 RAMSIZE0 SIZE
Expand Down Expand Up @@ -131,13 +132,24 @@
ora #%00000001 ; bit 0 = Speaker
sta ZC_REG_SLOTSPKR

;; Get size
lda ZC_REG_STATUS
and #%00000011
asl
tax
lda size_table,x
sta size
lda size_table+1,x
sta size+1

;; Lock
lda #kZCLock
sta ZC_REG_LOCK

;; TODO: Include cache size?
jsr log_message
scrcode PRODUCT, " - Configured."
scrcode PRODUCT, " "
size: .res 2 ; patched with cache size
scrcode "K - Configured."
.byte 0

plp
Expand All @@ -151,6 +163,14 @@ no_zip:
plp
rts

size_table:
scrcode " 8"
scrcode "16"
scrcode "32"
scrcode "64"



.endproc


Expand Down

0 comments on commit 764b4bd

Please sign in to comment.