@@ 1,9 1,9 @@
;
-; Top-level Synthesix program class
+; Top-level application program class
;
; Contains references to top-level objects, the main loop and the core ISR.
;
-Synthesix: MACRO
+Application: MACRO
scc:
dw 0
sccVoiceBank:
@@ 17,7 17,7 @@ Synthesix: MACRO
ENDM
;
-Synthesix_Main:
+Application_Main:
call VDP_GetVersion
cp 1
ret c
@@ 34,9 34,9 @@ Synthesix_Main:
call MathTest_Test
call ArrayListTest_Test
- ld ix,Synthesix_instance
- call Synthesix_Constructor
- call Synthesix_EnterMainLoop
+ ld ix,Application_instance
+ call Application_Constructor
+ call Application_EnterMainLoop
ld iy,(EXPTBL-1)
ld ix,KILBUF
@@ 45,17 45,17 @@ Synthesix_Main:
; ix = this
; ix <- this
-Synthesix_Constructor:
+Application_Constructor:
push ix
ld ix,KeyMidi_instance
call KeyMidi_Constructor
call Channels_Init
call PSG_Init
call SCC_New
- ld (Synthesix_instance.scc),ix
+ ld (Application_instance.scc),ix
ld hl,Channel_channels.0
call Program_New
- ld (Synthesix_instance.program),ix
+ ld (Application_instance.program),ix
call UI_Init
@@ 64,7 64,7 @@ Synthesix_Constructor:
ret
; ix = this
-Synthesix_EnterMainLoop:
+Application_EnterMainLoop:
call Interrupt_EnableInterruptHandler
ld ix,PhilipsMidi_instance
call PhilipsMidi_Install
@@ 72,10 72,10 @@ Synthesix_EnterMainLoop:
call MSXMidi_Install
ld ix,SFGMidi_instance
call SFGMidi_Install
- ld hl,Synthesix_Interrupt
+ ld hl,Application_Interrupt
call Interrupt_InstallTIMIHook
- call Synthesix_MainLoop
+ call Application_MainLoop
ld ix,SFGMidi_instance
call SFGMidi_Uninstall
@@ 87,15 87,15 @@ Synthesix_EnterMainLoop:
call Interrupt_DisableInterruptHandler
ret
-Synthesix_MainLoop:
+Application_MainLoop:
call UI_Update
ld ix,KeyMidi_instance
bit 0,(ix + KeyMidi.quit)
- jp z,Synthesix_MainLoop
+ jp z,Application_MainLoop
ret
-Synthesix_Interrupt:
- call Synthesix_StartSpeedMeasurement
+Application_Interrupt:
+ call Application_StartSpeedMeasurement
ld ix,MSXMidi_instance
call MSXMidi_CheckOverrun
@@ 118,22 118,22 @@ Synthesix_Interrupt:
ld ix,Updater_60HzLate
call Updater_Update
- call Synthesix_EndSpeedMeasurement
+ call Application_EndSpeedMeasurement
ret
-Synthesix_StartSpeedMeasurement:
+Application_StartSpeedMeasurement:
ld a,0F5H
call VDP_SetColor
call System_GetHighResTimerValue
- ld (Synthesix_instance.lastSpeedMeasurementStart),hl
+ ld (Application_instance.lastSpeedMeasurementStart),hl
ret
-Synthesix_EndSpeedMeasurement:
+Application_EndSpeedMeasurement:
call System_GetHighResTimerValue
- ld de,(Synthesix_instance.lastSpeedMeasurementStart)
+ ld de,(Application_instance.lastSpeedMeasurementStart)
and a
sbc hl,de
- ld (Synthesix_instance.lastSpeedMeasurement),hl
+ ld (Application_instance.lastSpeedMeasurement),hl
ld a,0F4H
call VDP_SetColor
ret
@@ 141,6 141,6 @@ Synthesix_EndSpeedMeasurement:
;
SECTION RAM
-Synthesix_instance: Synthesix
+Application_instance: Application
ENDS
@@ 1,7 1,7 @@
;
;
;
-UISynthesix: MACRO
+UIApplication: MACRO
buffer:
dw 0
patchEditor:
@@ 9,53 9,53 @@ UISynthesix: MACRO
_size:
ENDM
- dw UISynthesix._size
-UISynthesix_class: UISynthesix
+ dw UIApplication._size
+UIApplication_class: UIApplication
; ix, de <- new object
-UISynthesix_New:
- ld iy,UISynthesix_class
+UIApplication_New:
+ ld iy,UIApplication_class
call Class_New
- jp UISynthesix_Constructor
+ jp UIApplication_Constructor
; ix = this
; ix, de <- this
-UISynthesix_Constructor:
+UIApplication_Constructor:
push ix
call UIBuffer_New
pop ix
- ld (ix + UISynthesix.buffer),e
- ld (ix + UISynthesix.buffer + 1),d
+ ld (ix + UIApplication.buffer),e
+ ld (ix + UIApplication.buffer + 1),d
push ix
- ld ix,(Synthesix_instance.program)
+ ld ix,(Application_instance.program)
ld e,(ix + Program.patch)
ld d,(ix + Program.patch + 1)
call PatchEditor_New
pop ix
- ld (ix + UISynthesix.patchEditor),e
- ld (ix + UISynthesix.patchEditor + 1),d
+ ld (ix + UIApplication.patchEditor),e
+ ld (ix + UIApplication.patchEditor + 1),d
ld e,ixl
ld d,ixh
ret
-UISynthesix_Update:
+UIApplication_Update:
push ix
- ld e,(ix + UISynthesix.patchEditor)
- ld d,(ix + UISynthesix.patchEditor + 1)
+ ld e,(ix + UIApplication.patchEditor)
+ ld d,(ix + UIApplication.patchEditor + 1)
ld ixl,e
ld ixh,d
call PatchEditor_Update
pop ix
push ix
- ld e,(ix + UISynthesix.buffer)
- ld d,(ix + UISynthesix.buffer + 1)
+ ld e,(ix + UIApplication.buffer)
+ ld d,(ix + UIApplication.buffer + 1)
ld iyl,e
ld iyh,d
call UIBuffer_ClearBlinkBuffer
call UIBuffer_GetBuffer
push iy
- call UISynthesix_Paint
+ call UIApplication_Paint
pop iy
call UIBuffer_Draw
pop ix
@@ 64,10 64,10 @@ UISynthesix_Update:
; ix = this
; iy = buffer
; hl = buffer address
-UISynthesix_Paint:
+UIApplication_Paint:
push hl
ex de,hl
- ld hl,UISynthesix_template
+ ld hl,UIApplication_template
ld bc,0150H
call UIBuffer_CopyToBuffer
pop hl
@@ 75,14 75,14 @@ UISynthesix_Paint:
push hl
ld de,004CH
add hl,de
- ld de,(Synthesix_instance.lastSpeedMeasurement)
+ ld de,(Application_instance.lastSpeedMeasurement)
call UIBuffer_PrintHexDE
pop hl
push hl
push ix
- ld e,(ix + UISynthesix.patchEditor)
- ld d,(ix + UISynthesix.patchEditor + 1)
+ ld e,(ix + UIApplication.patchEditor)
+ ld d,(ix + UIApplication.patchEditor + 1)
ld ixl,e
ld ixh,d
ld de,0100H
@@ 102,7 102,7 @@ UISynthesix_Paint:
ld de,1300H
call UIBuffer_GetRelativePosition
ld a,0
- ld ix,(Synthesix_instance.sccVoiceBank)
+ ld ix,(Application_instance.sccVoiceBank)
call ModuleBank_GetModule
ld bc,4 << 8 | 0
call ModuleView_Paint
@@ 112,7 112,7 @@ UISynthesix_Paint:
ld de,1310H
call UIBuffer_GetRelativePosition
ld a,1
- ld ix,(Synthesix_instance.sccVoiceBank)
+ ld ix,(Application_instance.sccVoiceBank)
call ModuleBank_GetModule
ld bc,4 << 8 | 0
call ModuleView_Paint
@@ 122,7 122,7 @@ UISynthesix_Paint:
ld de,1320H
call UIBuffer_GetRelativePosition
ld a,2
- ld ix,(Synthesix_instance.sccVoiceBank)
+ ld ix,(Application_instance.sccVoiceBank)
call ModuleBank_GetModule
ld bc,4 << 8 | 0
call ModuleView_Paint
@@ 132,7 132,7 @@ UISynthesix_Paint:
ld de,1330H
call UIBuffer_GetRelativePosition
ld a,3
- ld ix,(Synthesix_instance.sccVoiceBank)
+ ld ix,(Application_instance.sccVoiceBank)
call ModuleBank_GetModule
ld bc,4 << 8 | 0
call ModuleView_Paint
@@ 140,7 140,7 @@ UISynthesix_Paint:
ret
;
-UISynthesix_template:
+UIApplication_template:
ds 29," "
db 168,169,32,160,32,161,32,162,32,163,32,164,32,165,32,160,32,166,32,167,32,170,171
ds 23," "