;OS7 defines GAME_OPT EQU 1f7ch RAND_GEN EQU 1ffdh ;Output: 16 bit result in RAND_NUM, HL, A=L RAND_NUM EQU 73c8h ;2 byte output of last call to RAND_GEN POLLER EQU 1febh ;To be added together for CONTROLLER_MAP +0 (player 1), and +1 (player 2) CONTROLLER_ENABLE EQU 80h KEYPAD_ENABLE EQU 10h ARM_BUTTON_ENABLE EQU 8 JOYSTICK_ENABLE EQU 2 FIRE_BUTTON_ENABLE EQU 1 ;Controller Table offsets PLAYER1 EQU 0 ;Settings (above) PLAYER2 EQU 1 FIRE1 EQU 2 ;Fire button 1 (40h=yes, 0=no) JOY1 EQU 3 ;1=N, 2=E, 4=S, 8=W, etc. SPIN1 EQU 4 ;counter ARM1 EQU 5 ;Arm button 1 (40h=yes, 0=no) KEYPAD1 EQU 6 ;0-9, '*'=10, '#'=11 FIRE2 EQU 7 JOY2 EQU 8 SPIN2 EQU 9 ARM2 EQU 10 KEYPAD2 EQU 11 ;Timer related calls INIT_TIMER EQU 1fc7h ;**HL=timer table,DE=timer data block FREE_SIGNAL EQU 1fcah ;Note: must not be interrupted REQUEST_SIGNAL EQU 1fcdh TEST_SIGNAL EQU 1fd0h TIME_MGR EQU 1fd3h AMERICA EQU 0069h ;Contains how many timer ticks in a second (50/60) ;Video display calls READ_VRAM EQU 1fe2h ;HL=zram, DE=vram, BC=len --note len<100h or multiple of 100h WRITE_VRAM EQU 1fdfh ;HL=zram, DE=vram, BC=len --note len<100h or multiple of 100h FILL_VRAM EQU 1f82h ;HL=vram, DE=len, A=value MODE_1 EQU 1f85h INIT_TABLE EQU 1fb8h LOAD_ASCII EQU 1f7fh ;Writes the ASCII character set to the table set up by INIT_TABLE WRITE_REGISTER EQU 1fd9h ;B=register, C=value READ_REGISTER EQU 1fdch ;returns result in A VDP_MODE_WORD EQU 73c3h VDP_STATUS_BYTE EQU 73c5h ;VRAM Table based calls GET_VRAM EQU 1fbbh PUT_VRAM EQU 1fbeh ;HL=z80 buffer, IY=length, DE=cell #, A=2-name table REFLECT_VERTICAL EQU 1f6ah ;A=table code,DE=source cell,HL=dest cell,BC=count RELFECT_HORIZONTAL EQU 1f6dh ;A=table code,DE=source cell,HL=dest cell,BC=count ROTATE_90 EQU 1f70h ;A=table code,DE=source cell,HL=dest cell,BC=count ENLARGE EQU 1f73h ;A=table code,DE=source cell,HL=dest cell,BC=count INIT_SPR_ORDER EQU 1fc1h ;A=sprite count -- initializes spreite count address with the values 0 to sprite count-1 WR_SPR_NAM_TBL EQU 1fc4h ;A=count -- writes the sprites in the LOCAL_SPR_TABLE with the SPRITE_ORDER table remapping MUX_SPRITE EQU 73c7h ;Flag for PUT_VRAM for sprite name table, 1 means write to table at LOCAL_SPR_TABLE_PTR and let WR_SPR_NAM_TBL update the table, 0 means write to VRAM directly ;Video object related calls ACTIVATE EQU 1ff7h ;C/NC=write pattern/don't write pattern, HL=object definition PUTOBJ EQU 1ffah ;IX=object definition, B=background select INIT_WRITER EQU 1fc5h WRITER EQU 1fc8h ;Special entry points released by Coleco PUT_FRAME EQU 080bh ;HL=z80 buffer, name table: D=y, E=x, B=height, C=width GET_BKGRND EQU 0898h ;HL=z80 buffer, name table: D=y, E=x, B=height, C=width ;Music/sound effects related SOUND_INIT EQU 1feeh SOUND_MAN EQU 1ff4h PLAY_IT EQU 1ff1h PLAY_SONGS EQU 1f61h TURN_OFF_SOUND EQU 1fd6h ;Data tables ;OS7 reserves 7020-702a and 73ba-73ff for internal bookkeeping OS7_SOUND_TABLE EQU 7020h OS7_USER_SPACE EQU 702bh ;OS7_TOP_OF_STACK EQU 73b9h ;Grows downward ;OS7_PASCAL_PARAM EQU 73bah ;OS7 Pascal parameter passing area COLOR_TABLE_PTR EQU 73fah OS7_DATA_TABLES_END EQU 73ffh ;The cartridge starts with a fixed length table CARTRIDGE EQU 8000h ;Either 55aa or aa55 for title screen or not. LOCAL_SPR_TBL_PTR EQU 8002h ;fixed sprite name table 4*number of entries bytes long SPRITE_ORDER_PTR EQU 8004h ;pointer to sprite order table number of sprites bytes long WORK_BUFFER_PTR EQU 8006h ;pointer to graphics working buffer (see notes for the length needed -- no more than 232(?) though) CONTROLLER_MAP_PTR EQU 8008h ;Pointer to 12 byte buffer for the POLLER call START_GAME_PTR EQU 800ah ;Pointer to the start routine ;The restart vectors are used for code compaction, and can be reprogrammed RST_8H_VECT EQU 800ch ;Restart 8 RST_10H_VECT EQU 800fh ;Restart 10 RST_18H_VECT EQU 8012h ;Restart 18 RST_20H_VECT EQU 8015h ;Restart 20 RST_28H_VECT EQU 8018h ;Restart 28 RST_30H_VECT EQU 801bh ;Restart 30 ;The maskable interrupt is triggered by the spinner (super action, roller, turbo) MASK_VECT EQU 801eh ;The non-maskable interrupt is triggered by the VDP 50 or 60 times per second NMI_VECT EQU 8021h ;There is up to 60 byte program name buffer which is "PROGRAM/PRESENTS CO'S/19xx" GAME_NAME EQU 8024h