mirror of
https://github.com/tomcw/Cybernoid.git
synced 2025-01-13 20:32:04 +00:00
Build both Cybernoid (for MB) and Cybernoid.PH (for Phasor)
This commit is contained in:
parent
0c58998e02
commit
f3e394202f
@ -1,7 +1,6 @@
|
||||
|
||||
SPECTRUM128_STEREO = 1 ; L = A+Bx0.5, R = C'+B'x0.5
|
||||
DUAL_MONO = 0 ; L = A+B+C, R=A'+B'+C'
|
||||
USE_PHASOR = 1
|
||||
|
||||
|
||||
!macro MB_Init1 .RegSongNum {
|
||||
@ -180,7 +179,7 @@ InitExit2:
|
||||
;--------------------------------------
|
||||
|
||||
!if USE_PHASOR {
|
||||
PHASOR_CS_MASK = %10000 ; Phasor: b4=1 (don't select), b3=0 (select)
|
||||
PHASOR_CS_MASK = AY_CS2 ; Phasor: b4=1 (don't select), b3=0 (select)
|
||||
} else {
|
||||
PHASOR_CS_MASK = 0
|
||||
}
|
||||
|
@ -7,49 +7,117 @@ SY6522_A_PH_BASE = $10 ; Phasor mode (this is common to both MB & Phasor modes)
|
||||
SY6522_B_BASE = $80
|
||||
|
||||
SY6522_ORB = 0
|
||||
SY6522_IRB = 0
|
||||
SY6522_ORA = 1
|
||||
SY6522_IRA = 1
|
||||
SY6522_DDRB = 2
|
||||
SY6522_DDRA = 3
|
||||
SY6522_TIMER1L_COUNTER = 4
|
||||
SY6522_TIMER1H_COUNTER = 5
|
||||
SY6522_TIMER1L_LATCH = 6
|
||||
SY6522_TIMER1H_LATCH = 7
|
||||
SY6522_TIMER2L_COUNTER = 8
|
||||
SY6522_TIMER2H_COUNTER = 9
|
||||
SY6522_SR = $A
|
||||
SY6522_ACR = $B
|
||||
SY6522_PCR = $C
|
||||
SY6522_IFR = $D
|
||||
SY6522_IER = $E
|
||||
|
||||
AY_AFINE = 0
|
||||
AY_ACOARSE = 1
|
||||
AY_BFINE = 2
|
||||
AY_BCOARSE = 3
|
||||
AY_CFINE = 4
|
||||
AY_CCOARSE = 5
|
||||
AY_NOISEPER = 6
|
||||
AY_ENABLE = 7
|
||||
AY_AVOL = 8
|
||||
AY_BVOL = 9
|
||||
AY_CVOL = 10
|
||||
AY_EFINE = 11
|
||||
AY_ECOARSE = 12
|
||||
AY_ESHAPE = 13
|
||||
ACR_ONESHOT = 0<<6
|
||||
ACR_FREERUNNING = 1<<6
|
||||
|
||||
IER_SET = 1<<7
|
||||
IER_CLR = 0<<7
|
||||
IxR_TIMER1 = 1<<6
|
||||
IxR_TIMER2 = 1<<5
|
||||
IxR_VOTRAX = 1<<4 ; 6522 CB1
|
||||
IxR_SSI263 = 1<<1 ; 6522 CA1/Peripheral
|
||||
|
||||
AY_AFINE = 0 ; b7:0
|
||||
AY_ACOARSE = 1 ; b3:0
|
||||
AY_BFINE = 2 ; b7:0
|
||||
AY_BCOARSE = 3 ; b3:0
|
||||
AY_CFINE = 4 ; b7:0
|
||||
AY_CCOARSE = 5 ; b3:0
|
||||
AY_NOISEPER = 6 ; b4:0
|
||||
AY_ENABLE = 7 ; b7:0 - for AY-3-8913, there is no PORTA/B so b7:6 are redundant
|
||||
AY_AVOL = 8 ; b4:0
|
||||
AY_BVOL = 9 ; b4:0
|
||||
AY_CVOL = 10 ; b4:0
|
||||
AY_EFINE = 11 ; b7:0
|
||||
AY_ECOARSE = 12 ; b7:0
|
||||
AY_ESHAPE = 13 ; b3:0
|
||||
AY_PORTA = 14 ; b7:0 - not available on AY-3-8913
|
||||
AY_PORTB = 15 ; b7:0 - not available on AY-3-8913
|
||||
|
||||
AY_NOISE_MASK = $1f ; valid bits of AY_NOISEPER
|
||||
AY_AMPLITUDE_MODE = $10 ; b4 of AY_xVOL (0=fixed, 1=envelope)
|
||||
|
||||
AY_ENA_A = %110110 ; Enable A (Noise & Tone)
|
||||
AY_ENA_B = %101101 ; Enable B (Noise & Tone)
|
||||
AY_ENA_C = %011011 ; Enable C (Noise & Tone)
|
||||
AY_ENA_A = %00110110 ; Enable A (Noise & Tone)
|
||||
AY_ENA_B = %00101101 ; Enable B (Noise & Tone)
|
||||
AY_ENA_C = %00011011 ; Enable C (Noise & Tone)
|
||||
|
||||
AY_DIS_A = %001001 ; Disable A (Noise & Tone)
|
||||
AY_DIS_B = %010010 ; Disable B (Noise & Tone)
|
||||
AY_DIS_C = %100100 ; Disable C (Noise & Tone)
|
||||
AY_DIS_A = %00001001 ; Disable A (Noise & Tone)
|
||||
AY_DIS_B = %00010010 ; Disable B (Noise & Tone)
|
||||
AY_DIS_C = %00100100 ; Disable C (Noise & Tone)
|
||||
|
||||
; AY inputs on BDIR|BC2|BC1:
|
||||
AY_RESET = 0
|
||||
AY_INACTIVE = 4
|
||||
AY_READ = 5
|
||||
AY_WRITE = 6
|
||||
AY_LATCH = 7
|
||||
; 6522 ORB bit: 2 1 0
|
||||
; AY inputs on: /RESET|BDIR|BC1: (BC2=1)
|
||||
AY_RESET = 0 ; 0 - -
|
||||
AY_INACTIVE = 4 ; 1 0 0
|
||||
AY_READ = 5 ; 1 0 1
|
||||
AY_WRITE = 6 ; 1 1 0
|
||||
AY_LATCH = 7 ; 1 1 1
|
||||
AY_FUNC_MASK = %00000111
|
||||
; Phasor extra chip-select bits (when in native Phasor mode):
|
||||
AY_NOT_CS1 = $10
|
||||
AY_NOT_CS2 = $08
|
||||
AY_CS1 = AY_NOT_CS2
|
||||
AY_CS2 = AY_NOT_CS1
|
||||
AY_NO_CS = AY_NOT_CS1|AY_NOT_CS2 ; each CS is active low
|
||||
AY_BOTH_CS = $00
|
||||
; Echo+ extra chip-select bits:
|
||||
AY_ECHO_CS1 = $08
|
||||
AY_ECHO_CS2 = $10
|
||||
AY_ECHO_NO_CS = AY_ECHO_CS1|AY_ECHO_CS2 ; each CS is active low
|
||||
AY_ECHO_BOTH_CS = $00
|
||||
|
||||
; SSI263:
|
||||
SSI_DURPHON = 0
|
||||
SSI_INFLECT = 1
|
||||
SSI_RATEINF = 2
|
||||
SSI_CTTRAMP = 3
|
||||
SSI_FILFREQ = 4
|
||||
SSI_NUM_REGS = SSI_FILFREQ+1
|
||||
SSI_A_BASE = $40
|
||||
SSI_A_DURPHON = SSI_A_BASE + SSI_DURPHON
|
||||
SSI_A_INFLECT = SSI_A_BASE + SSI_INFLECT
|
||||
SSI_A_RATEINF = SSI_A_BASE + SSI_RATEINF
|
||||
SSI_A_CTTRAMP = SSI_A_BASE + SSI_CTTRAMP
|
||||
SSI_A_FILFREQ = SSI_A_BASE + SSI_FILFREQ
|
||||
SSI_B_BASE = $20
|
||||
SSI_B_DURPHON = SSI_B_BASE + SSI_DURPHON
|
||||
SSI_B_INFLECT = SSI_B_BASE + SSI_INFLECT
|
||||
SSI_B_RATEINF = SSI_B_BASE + SSI_RATEINF
|
||||
SSI_B_CTTRAMP = SSI_B_BASE + SSI_CTTRAMP
|
||||
SSI_B_FILFREQ = SSI_B_BASE + SSI_FILFREQ
|
||||
|
||||
; Duration/Phoneme
|
||||
DURATION_MODE_MASK = $C0
|
||||
PHONEME_MASK = $3F
|
||||
|
||||
MODE_PHONEME_TRANSITIONED_INFLECTION = $C0 ; IRQ active
|
||||
MODE_PHONEME_IMMEDIATE_INFLECTION = $80 ; IRQ active
|
||||
MODE_FRAME_IMMEDIATE_INFLECTION = $40 ; IRQ active
|
||||
MODE_IRQ_DISABLED = $00
|
||||
|
||||
; Ctrl/Art/Amp
|
||||
CONTROL_MASK = $80
|
||||
CONTROL_H = CONTROL_MASK
|
||||
CONTROL_L = 0
|
||||
|
||||
REQ_NEW_DATA = 1<<7 ; D7 (inverted state of A/!R). Phasor mode only, when reading any register
|
||||
|
||||
; Phasor mode
|
||||
PH_MOCKINGBOARD = 8
|
||||
|
@ -1,17 +1,19 @@
|
||||
;ACME 0.85
|
||||
;ACME 0.97
|
||||
|
||||
!cpu 6502 ; Compatible with all Apple2's
|
||||
!to "Cybernoid", plain
|
||||
!to "CYBERNOID", plain
|
||||
!sl "Cybernoid.labels"
|
||||
*=$6000
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
!source "..\Common\Z80-Macros.a"
|
||||
!source "..\Common\ZP-Macros.a"
|
||||
!source "..\Common\AppleDefs.a"
|
||||
!source "..\Common\MockingboardDefs.a"
|
||||
!source "..\Common\MB-Macros.a"
|
||||
;USE_PHASOR = 0 ; defined on command line
|
||||
|
||||
!source "..\\Common\\Z80-Macros.a"
|
||||
!source "..\\Common\\ZP-Macros.a"
|
||||
!source "..\\Common\\AppleDefs.a"
|
||||
!source "..\\Common\\MockingboardDefs.a"
|
||||
!source "..\\Common\\MB-Macros.a"
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
@ -1127,8 +1129,11 @@ lf28e:
|
||||
; . Envelopes are not used, so no E-Periods to convert
|
||||
|
||||
!macro ZX2MB .period {
|
||||
; !word .period*10227/17734 ; Mockingboard 1MHz ((NTSC:14.3181818e6 / 14) / 100)
|
||||
!if USE_PHASOR {
|
||||
!word .period*20358/17734 ; Phasor 2MHz ((PAL:14.25045e6 / 7) / 100)
|
||||
}else{
|
||||
!word .period*10227/17734 ; Mockingboard 1MHz ((NTSC:14.3181818e6 / 14) / 100)
|
||||
}
|
||||
; !word .period
|
||||
}
|
||||
|
||||
|
@ -1,2 +1,6 @@
|
||||
acme.exe cybernoid.a
|
||||
copy cybernoid.labels %APPLEWIN_DBG%\A2_USER1.sym
|
||||
acme.exe -DUSE_PHASOR=1 cybernoid.a
|
||||
@REM copy cybernoid.labels %APPLEWIN_DBG%\A2_USER1.sym
|
||||
move /y Cybernoid CYBERNOID.PH
|
||||
|
||||
acme.exe -DUSE_PHASOR=0 cybernoid.a
|
||||
copy cybernoid.labels %APPLEWIN_DBG%\A2_USER1.sym
|
||||
|
Loading…
x
Reference in New Issue
Block a user