* * These are variables and such taken from the * player routine. They are common from player to * player, thus the compiler etc. doesn't care * which player is being used. * * * Editor and new start information * PLAYSTRT EQU $0EB0 METAKEYS = $0EB0 META1 EQU $0EB0 META2 EQU $0EC0 META3 EQU $0ED0 META4 EQU $0EE0 EDFLAGS EQU $0EF0 ;Editor flags SINGLEKEY EQU $0EF0 ;Single keystroke mode MACFLAG EQU $0EF1 ;Change how macros displayed DISPFLAG EQU $0EF2 ;Display mode BASEFLAG EQU $0EF3 ;Base 10/16 for number entry PLFLAG EQU $0EF4 ;Audible TRNSFLAG EQU $0EF5 ;Transpose RETFLAG EQU $0EF6 ;Insert return on player insts TRANSDUR EQU $0EF7 ;transpose duration TRANSNOT EQU $0EF8 ;transpose note ;Future expansion... INAMES EQU $0EFC ;Instrument names, 6 chars per ;instrument. KEYPOS EQU $0F50 ;Key positions NOTEPOS EQU KEYPOS+24 ;positions of note in big table NOTETEXT EQU $0F80 ;Text which goes with notes e.g. a# NOTEFREQ EQU NOTETEXT+48 ;Base freq values for notes FIELDP EQU $0FE0 ;Pointers, init by player ;ENDFIELD ;MACBEGIN ;BFIELD1 ;BFIELD2 ;BFIELD3 ;... BOOKMARK EQU $0FF0 * * My little kernal jump table * KERNAL EQU $1000 MAINPLAY EQU KERNAL PLAYINIT EQU MAINPLAY+3 SETIRQ EQU PLAYINIT+3 LOADINST EQU SETIRQ+3 GETP EQU LOADINST+3 SETP EQU GETP+3 V1GETP EQU SETP+3 V2GETP EQU V1GETP+3 V3GETP EQU V2GETP+3 V1SETP EQU V3GETP+3 V2SETP EQU V1SETP+3 V3SETP EQU V2SETP+3 RETURN EQU V3SETP+3 * JMP MAINPLAY * JMP INIT * JMP SETIRQ * JMP LOADINST ;Load instrument * JMP GETP ;Get current voice pointer * JMP SETP ;Set current voice pointer * JMP V1GETP ;Get voice 1 pointer * JMP V2GETP * JMP V3GETP * JMP V1SETP ;Set voice 1 pointer * JMP V2SETP * JMP V3SETP * * Variables, tables, etc. * * * These are the variables and such that must stay fixed * so that the compiler and editor don't screw everything * up. * FREQLO EQU KERNAL+64 * $1100 FREQHI EQU FREQLO+192 MARKERS EQU FREQHI+192 ;Table of 32 marker locations * $1200 MACADR EQU MARKERS+64 ;Macro starting addresses ;stored seqentially, i.e. ;lo hi lo hi ... thus may ;be jumped to via JMP() ;MUST start on page boundary GLOBVAR = MACADR+48 ;Global variables SHADOW = GLOBVAR+16 ;Shadow SID DURTAB = SHADOW+25 ;Table of initial durations INSTAB = DURTAB+24 ;Instrument table ;126 bytes (14 instruments) TEMPY = INSTAB+126 ;Temporary storage LOCOFF = TEMPY+1 ;(local) ariable offset ;8*current voice COFFSET = LOCOFF+1 ;SID offset (0 7 14) of current voice CURVOICE = COFFSET+1 ;Current voice CURFIELD = CURVOICE+1 ;Current field LASTNOTE = CURFIELD+1 ;Last note read in for voice V1FIELD = LASTNOTE+3 ;Voice 1 field V2FIELD = V1FIELD+1 ;Voice 2 field V3FIELD = V2FIELD+1 ;field associated with Voice 3 DURATION = V3FIELD+1 ;Duration for current field * $1300 TIMERUPT = DURATION+6 ;Interrupt timer setting STOPME = TIMERUPT+2 ;Stop this voice V1STOP = STOPME V2STOP = V1STOP+1 V3STOP = V2STOP+1 CURINST = V3STOP+1 ;Current instrument for this field FIELDS EQU CURINST+6 ;Pointers to start of fields. MACBYTE1 = FIELDS+12 ;Macro active bytes MACBYTE2 = MACBYTE1+7 MACBYTE3 = MACBYTE2+7 LOCALVAR EQU MACBYTE3+7 ;3+1 sets of 8 local variables