fix gregs complaints :)
This commit is contained in:
@@ -6,11 +6,10 @@
|
|||||||
CURS_X = $30
|
CURS_X = $30
|
||||||
CURS_Y = $31
|
CURS_Y = $31
|
||||||
SCREEN_PTR = $32 ;2
|
SCREEN_PTR = $32 ;2
|
||||||
CRAM_PTR = $34 ;2
|
CHARCOLOR = $34
|
||||||
CHARCOLOR = $36
|
RVS = $35
|
||||||
RVS = $37
|
BGCOLOR = $36
|
||||||
BGCOLOR = $38
|
tickcount = $37 ;4
|
||||||
tickcount = $39 ;4
|
|
||||||
|
|
||||||
; FIXME: screen dimensions my change according to selected video mode
|
; FIXME: screen dimensions my change according to selected video mode
|
||||||
screenrows = (224/8)
|
screenrows = (224/8)
|
||||||
@@ -66,6 +65,17 @@ VCE_DATA_HI = $0405 ; MSB of 16-bit palette data
|
|||||||
|
|
||||||
PSG = $0800 ; base
|
PSG = $0800 ; base
|
||||||
|
|
||||||
|
PSG_CHAN_SELECT = $0800
|
||||||
|
PSG_GLOBAL_PAN = $0801
|
||||||
|
PSG_FREQ_LO = $0802
|
||||||
|
PSG_FREQ_HI = $0803
|
||||||
|
PSG_CHAN_CTRL = $0804
|
||||||
|
PSG_CHAN_PAN = $0805
|
||||||
|
PSG_CHAN_DATA = $0806
|
||||||
|
PSG_NOISE = $0807
|
||||||
|
PSG_LFO_FREQ = $0808
|
||||||
|
PSG_LFO_CTRL = $0809
|
||||||
|
|
||||||
; timer
|
; timer
|
||||||
|
|
||||||
TIMER = $0c00 ; base
|
TIMER = $0c00 ; base
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ PLOT:
|
|||||||
ldy CURS_X
|
ldy CURS_X
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
.rodata
|
||||||
|
|
||||||
_plotlo:
|
_plotlo:
|
||||||
.repeat screenrows,line
|
.repeat screenrows,line
|
||||||
.byte <($0000+(line*$80))
|
.byte <($0000+(line*$80))
|
||||||
|
|||||||
@@ -5,20 +5,21 @@
|
|||||||
|
|
||||||
psg_init:
|
psg_init:
|
||||||
clx
|
clx
|
||||||
stx $0800 ; Select channel
|
stz PSG_GLOBAL_PAN ; Clear global balance
|
||||||
|
|
||||||
psg_clear_loop:
|
psg_clear_loop:
|
||||||
stz $0801 ; Clear global balance
|
stx PSG_CHAN_SELECT ; Select channel
|
||||||
stz $0802 ; Clear frequency LSB
|
stz PSG_FREQ_LO ; Clear frequency LSB
|
||||||
stz $0803 ; Clear frequency MSB
|
stz PSG_FREQ_HI ; Clear frequency MSB
|
||||||
stz $0804 ; Clear volume
|
stz PSG_CHAN_CTRL ; Clear volume
|
||||||
stz $0805 ; Clear balance
|
stz PSG_CHAN_PAN ; Clear balance
|
||||||
stz $0807 ; Clear noise control
|
stz PSG_NOISE ; Clear noise control
|
||||||
stz $0808 ; Clear LFO frequency
|
stz PSG_LFO_FREQ ; Clear LFO frequency
|
||||||
stz $0809 ; Clear LFO control
|
stz PSG_LFO_CTRL ; Clear LFO control
|
||||||
|
|
||||||
cly
|
cly
|
||||||
psg_clear_waveform:
|
psg_clear_waveform:
|
||||||
stz $0806 ; Clear waveform byte
|
stz PSG_CHAN_DATA ; Clear waveform byte
|
||||||
iny
|
iny
|
||||||
cpy #$20
|
cpy #$20
|
||||||
bne psg_clear_waveform
|
bne psg_clear_waveform
|
||||||
|
|||||||
@@ -2,10 +2,11 @@
|
|||||||
all: conio.pce
|
all: conio.pce
|
||||||
|
|
||||||
conio.pce: conio.c
|
conio.pce: conio.c
|
||||||
../../../bin/cl65 -t pce conio.c ../../../joy/pce-stdjoy.joy --mapfile conio.map -o conio.pce
|
../../../bin/cl65 -t pce conio.c --mapfile conio.map -o conio.pce
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) conio.pce
|
$(RM) conio.pce
|
||||||
|
$(RM) conio.map
|
||||||
|
|
||||||
test: conio.pce
|
test: conio.pce
|
||||||
mednafen -force_module pce conio.pce
|
mednafen -force_module pce conio.pce
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ void main(void)
|
|||||||
cprintf("stackvar: %02x\n\r", stackvar);
|
cprintf("stackvar: %02x\n\r", stackvar);
|
||||||
|
|
||||||
j = joy_count();
|
j = joy_count();
|
||||||
gotoxy(0,10);
|
gotoxy(0,9);
|
||||||
cprintf("Found %d Joysticks.", j);
|
cprintf("Found %d Joysticks.", j);
|
||||||
|
|
||||||
for (i = 0; i < 4; ++i) {
|
for (i = 0; i < 4; ++i) {
|
||||||
gotoxy(0, 17 + i);
|
gotoxy(0, 16 + i);
|
||||||
p = malloc(16);
|
p = malloc(16);
|
||||||
memcpy(p, "01234567890abcdef", 16);
|
memcpy(p, "0123456789abcdef", 16);
|
||||||
cprintf("alloced at: %04p - %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", p,
|
cprintf("alloced at: %04p - %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", p,
|
||||||
p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],
|
p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],
|
||||||
p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15]
|
p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15]
|
||||||
@@ -88,12 +88,12 @@ void main(void)
|
|||||||
cprintf("%02x", stackvar);
|
cprintf("%02x", stackvar);
|
||||||
++datavar; ++stackvar;
|
++datavar; ++stackvar;
|
||||||
|
|
||||||
gotoxy(0,8);
|
gotoxy(0,7);
|
||||||
clk = clock();
|
clk = clock();
|
||||||
cprintf("clock: %08lx", clk);
|
cprintf("clock: %08lx", clk);
|
||||||
|
|
||||||
for (i = 0; i < 4; ++i) {
|
for (i = 0; i < 4; ++i) {
|
||||||
gotoxy(0, 12 + i);
|
gotoxy(0, 11 + i);
|
||||||
j = joy_read (i);
|
j = joy_read (i);
|
||||||
cprintf ("pad %d: %02x %-6s%-6s%-6s%-6s%-6s%-6s%-6s%-6s",
|
cprintf ("pad %d: %02x %-6s%-6s%-6s%-6s%-6s%-6s%-6s%-6s",
|
||||||
i, j,
|
i, j,
|
||||||
|
|||||||
Reference in New Issue
Block a user