changeset 21:aa23c59bd36a

Rename the PIA setting routines to be more descriptive The PIA setting routines do more than mess with interrupts so name them appropriately.
author William Astle <lost@l-w.ca>
date Thu, 01 Jan 2015 22:32:23 -0700
parents 76b87449de65
children 82224f9ef319
files dod.s
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/dod.s	Thu Jan 01 22:27:22 2015 -0700
+++ b/dod.s	Thu Jan 01 22:32:23 2015 -0700
@@ -593,7 +593,7 @@
 		clr textother			; reset text rendering to standard mode
 		rts				; transfer control to correct game loop
 dodemo		dec waitnewgame			; flag demo game
-		bsr enablepiairq		; set up interrupts and sound
+		bsr setpiadod			; set up interrupts and sound
 		ldx #img_wizard			; point to wizard image
 		dec enablefadesound		; enable fade sound effect
 		fadein				; fade the wizard in
@@ -619,7 +619,7 @@
 		bra LC131			; go start demo running
 ; This routine sets up PIA1 for DoD mode. This means single bit sound
 ; is set to output, rs232 output is set to input, andVSYNC is enabled.
-enablepiairq	ldd #$34fc			; initializer for side A
+setpiadod	ldd #$34fc			; initializer for side A
 		clr PIA1+1			; set direction mode for side A
 		stb PIA1			; set direction properly
 		sta PIA1+1			; set back to data mode, no interrupts, cassette off
@@ -631,7 +631,7 @@
 		sta PIA1+3			; set back to data mode, no interrupts, sound on
 		cwai #$ef			; enable IRQ and wait for one
 		rts				; return to caller
-dogame		bsr enablepiairq		; set up interrupts and sound
+dogame		bsr setpiadod			; set up interrupts and sound
 		ldd #$100b			; maze position (11,16)
 		std playerloc			; set start position there
 		clr powerlevel			; reset power level to new game level (keeps LSB of default value)
@@ -667,7 +667,7 @@
 		showprompt			; show command prompt
 		jmp LC1F5			; go to main loop
 ; This routine sets up PIA1 for Basic (with interrupts disabled)
-disablepiairq	ldd #$34fe			; initializer for side A
+setpiabasic	ldd #$34fe			; initializer for side A
 		sta PIA0+3			; disable VSYNC interrupt, clear analogue mux MSB
 		clr PIA1+1			; set direction mode for side A
 		stb PIA1			; set direction properly (sets RS232 to output)
@@ -5035,11 +5035,11 @@
 ; Exit with C clear if no error and C set if error.
 save_game	pshs d,x,y,u			; save registers
 		jsr loadsave_setfn		; set up file name
-		jsr disablepiairq		; reset PIAs to Basic mode
+		jsr setpiabasic			; reset PIAs to Basic mode
 		ldd #$0100			; set to "binary data" format
 		jsr file_openo			; open file for output
 		beq save_game004		; brif no error opening file
-save_gameerr	jsr enablepiairq		; restore PIAs to daggorath mode
+save_gameerr	jsr setpiadod			; restore PIAs to daggorath mode
 		coma				; flag error on save
 		puls d,x,y,u,pc			; return to caller
 file_writen	lda ,x+				; get byte to write
@@ -5125,7 +5125,7 @@
 		blo save_game018		; brif not
 		jsr file_close			; close the disk file
 		lbne save_gameerr		; brif error closing (writing buffer failed)
-		jsr enablepiairq		; restore PIAs to daggorath mode
+		jsr setpiadod			; restore PIAs to daggorath mode
 		clra				; clear carry for success
 		puls d,x,y,u,pc			; restore registers and return
 save_writesched	subd #schedtab			; adjust to offset in scheduling table
@@ -5169,12 +5169,12 @@
 load_game	clrb				; mark current game still valid
 		pshs d,x,y,u			; save registers
 		bsr loadsave_setfn		; set up the file name correctly
-		jsr disablepiairq		; set up PIA for Basic I/O
+		jsr setpiabasic			; set up PIA for Basic I/O
 		jsr file_openi			; open file for output
 		beq load_game004		; brif no error opening file
 		bra load_gameerrx		; throw error if open failed
 load_gameerr	jsr file_close			; close the file if it's open
-load_gameerrx	jsr enablepiairq		; reset PIAs to DoD mode
+load_gameerrx	jsr setpiadod			; reset PIAs to DoD mode
 		coma				; flag error on save
 		puls d,x,y,u,pc			; return to caller
 file_readn	jsr file_read			; read byte
@@ -5304,7 +5304,7 @@
 		bpl load_game020		; brif we didn't consume a flag
 		decb				; are we at the right set of data for the level?
 		bpl load_game019		; brif not - save new pointer and search again
-		jsr enablepiairq		; reset PIA to DoD mode
+		jsr setpiadod			; reset PIA to DoD mode
 		clra				; clear carry for success
 		puls d,x,y,u,pc			; restore registers and return
 load_readsched	ldd #schedtab			; set the bias for the read