SweProj 9 months ago
parent
commit
ac3669bfa1

+ 3 - 3
hw/monroe_oc8820_r3.00.asm

@@ -174,9 +174,9 @@ TESTING_end:
 	out (0c5h),a		;00cc Program map B base
 	ld b,(ix-001h)		;00ce
 	inc b			;00d1
-	jr z,skipd011		;00d2 $+4 skip for start of memtest 
+	jr z,skip256		;00d2 $+4 skip for start of memtest 
 	ld d,011h		;00d4
-skipd011:
+skip256:
 	ld b,d			;00d6
 	ld hl,memtesteval		;00d7  00122h
 	ld de,0000h		;00da
@@ -239,7 +239,7 @@ memtesteval:		;Memory ports
 	defb 040h		;0127
 	defb 060h		;0128
 	defb 080h		;0129
-	defb 0a0h		;012a
+	defb 0a0h		;012a //Start of 256kB memtest
 	defb 0c0h		;012b
 	defb 0e0h		;012c
 	defb 001h		;012d

+ 23 - 23
monroe-diagnosticrom/inc/memtestsplit.asm

@@ -23,21 +23,21 @@
 
 memtest_init:
 		xor	a
-		ld	e,a			; reset error accumulator
+		ld	e,a				; reset error accumulator
 		ret
 
 memtest_absent:
 		ld	b,h
 		ld	c,1
-		cpl				; A := FF
-	.redo	ld	(hl),a			; write FF to base
-		cpl				; A := 0
+		cpl					; A := FF
+	.redo	ld	(hl),a		; write FF to base
+		cpl					; A := 0
 		ld	(bc),a			; write 00 to base+1
 		cp	(hl)			; compare to base (should be FF, should not match)
 		jr	z,.allbad		; if they match, all bits are bad, but double-check
-		cp	0			; are we on the first round?
+		cp	0				; are we on the first round?
 		jr	z,.redo			; yes, redo with reversed bits
-		ret				; didn't find missing ram, exit without error
+		ret					; didn't find missing ram, exit without error
 	.allbad:
 		ld	e,$FF			; report all bits bad
 		ret
@@ -55,14 +55,14 @@ memtest_march_w_up:
 memtest_march_rw_up:
 	.loop:
 		ld	a,(hl)
-		cp	d			; compare to value
+		cp	d				; compare to value
 		jr	z, .cont		; memory changed, report
-		xor	d			; calculate errored bits
+		xor	d				; calculate errored bits
 		or	e				
-		ld	e,a			; save error bits to e
-		ld	a,d			; reload a with correct value
+		ld	e,a				; save error bits to e
+		ld	a,d				; reload a with correct value
 	.cont:
-		cpl				; take the complement
+		cpl					; take the complement
 		ld	(hl),a			; write the complement
 		inc	hl
 		dec	bc
@@ -76,14 +76,14 @@ memtest_march_rw_dn:
 		dec	hl
 	.loop:
 		ld	a,(hl)
-		cp	d			; compare to value
+		cp	d				; compare to value
 		jr	z, .cont
-		xor	d			; calculate errored bits
+		xor	d				; calculate errored bits
 		or	e				
-		ld	e,a			; save error bits to e
-		ld	a,d			; reload a with correct value
+		ld	e,a				; save error bits to e
+		ld	a,d				; reload a with correct value
 	.cont:
-		cpl				; take the complement
+		cpl					; take the complement
 		ld	(hl),a			; write complement
 		dec	hl
 		dec	bc
@@ -99,10 +99,10 @@ memtest_march_r_dn:
 		ld	a,(hl)
 		cp	d
 		jr	z,.cont
-		xor	d			; calculate errored bits
+		xor	d				; calculate errored bits
 		or	e				
-		ld	e,a			; save error bits to e
-		ld	a,d			; reload a with correct value
+		ld	e,a				; save error bits to e
+		ld	a,d				; reload a with correct value
 	.cont:
 		dec	hl
 		dec	bc
@@ -114,12 +114,12 @@ memtest_march_r_dn:
 
 	mtmredo:
 		ld	a,d	
-		cp	0			; if our test value is 0
+		cp	0				; if our test value is 0
 		ld	d,$55
-		jr	z,mtm1_bounce		; then rerun the tests with value $55
+		jr	z,mtm1_bounce	; then rerun the tests with value $55
 
 	mtm_done:
-		sub	a			; set carry flag if e is nonzero
+		sub	a				; set carry flag if e is nonzero
 		or	e
 	mtm_return:
 		ret	z
@@ -128,7 +128,7 @@ memtest_march_r_dn:
 
 memtest_march:
 		xor	a
-		ld	e,a			; reset error accumulator
+		ld	e,a				; reset error accumulator
 
 		push	hl			; save the test regs
 		push	bc

+ 17 - 17
monroe-diagnosticrom/inc/monroecon.asm

@@ -1,16 +1,16 @@
 spt_con_print:	pop hl
 con_print:
-	ld a,004h			; Select display memory
-	out (0c8h),a		; Output to screen Map and system control		
+	ld a,004h				; Select display memory
+	out (0c8h),a			; Output to screen Map and system control		
 	.loop:
-		ld a,(HL)       ; get message char
-		or a            ; test for null
-		jr z, .done     ; return if done
-		ld (ix+1),A     ; store char
-		inc ix          ; advance screen pointer
+		ld a,(HL)       	; get message char
+		or a            	; test for null
+		jr z, .done     	; return if done
+		ld (ix+1),A     	; store char
+		inc ix          	; advance screen pointer
 		inc ix
-		inc hl          ; advance message pointer
-		jr .loop        ; continue
+		inc hl          	; advance message pointer
+		jr .loop        	; continue
 
 	.done:
 		xor a				;054b Reset map
@@ -24,12 +24,12 @@ spt_con_goto:	pop ix
 		ret
 
 con_NL:
-		ld a,ixl		; go to beginning of line
-		and $af			; then go to the next line
+		ld a,ixl			; go to beginning of line
+		and $af				; then go to the next line
 		add a,$a0
-		ld ixl,a		; store the low byte back
+		ld ixl,a			; store the low byte back
 		jr nc,.skip
-		inc ixh			; fix up high byte if there was a carry
+		inc ixh				; fix up high byte if there was a carry
 	.skip:
 		ret
 
@@ -40,13 +40,13 @@ con_clear:
 		out (0c8h),a		; Output to screen Map and system control	
 	.loop:
 
-		ld (hl),000h			;Put 00h in even byte
-		inc hl			; bump
+		ld (hl),000h		;Put 00h in even byte
+		inc hl				; bump
 		ld (hl),020h		;Put 20h in odd byte
 		dec bc
-		cpi			; increments HL, decrements BC (and does a CP)
+		cpi					; increments HL, decrements BC (and does a CP)
 		jp pe, .loop
-		xor a			;  Reset A
+		xor a				;  Reset A
 		ld ix,VBASE
 		out (0c8h),a		;054c Reset to memory Map and system control
 		ret

+ 12 - 13
monroe-diagnosticrom/monroeoc8800diag.asm

@@ -54,18 +54,17 @@ init_continue:
 
 	jp setupclearscreen
 screen_clear_continue:
-	ld a,080h		;0092
-	out (0d4h),a
-	;  
-	ld a,005h		;00a8
-	out (0a3h),a		;00aa DART B command
-	ld a,068h		;00ac
-	out (0a3h),a		;00ae  DART B command
-	ld a,0f0h		;00b0  ?????
-	out (0c8h),a		;00b2 Map and system control
+	ld a,080h			;
+	out (0d4h),a		; Setup Screen
+	ld a,005h			;
+	out (0a3h),a		; DART B command
+	ld a,068h			;
+	out (0a3h),a		; DART B command
+	ld a,0f0h			; ?????
+	out (0c8h),a		; Map and system control
 	;select screen memory
-	ld a,004h			;0541 Select display memory
-	out (0c8h),a		;0543 Output to screen Map and system control
+	ld a,004h			; Select display memory
+	out (0c8h),a		; Output to screen Map and system control
 
 test_vram:
 		SPTHREAD_BEGIN				; set up to begin running threaded code
@@ -149,8 +148,8 @@ spt_prepare_display:
 		dw spt_exit
 spt_check_size:
 		; Check if 256k memory or 128k
-		ld hl,0c000h	;
-		ld a,0a0h		; 
+		ld hl,0c000h	; Point to test address
+		ld a,0a0h		; Memory bank
 		ld b,00h		;
 		out (0c5h),a	; Select memory bank 9
 		ld (hl),b		;

+ 1 - 1
monroe-diagnosticrom/monroeoc8800diag.hex

@@ -125,4 +125,4 @@
 :1007C000900480057005604050000040302000001B
 :1007D0000010C020000000FF30000044C080000076
 :0107E0000018
-:00000001FF
+:0000000000