Vectrex System - Hardware and Periphery Vextrex Games - Modules and Cartridges Vectrex History The last Vectrex news... The museum´s shop Vectrex Links - Info and Collectors pages

Back to Vectrex Programming Tutorial Index

Appendix A

List of Vectrex ROM functions:
(by Bruce Tomlin, modified by Christopher Salomon)

Functionally ordered:

Overview of functional classes

1. Calibration/vector reset functions
2. Counter handling functions
3. Day to day functions
4. Delay functions
5. Drawing functions

5.1 Dot functions
5.2 String functions
5.3 Vector functions

5.3.1 Drawing only
5.3.2 Drawing and moving

6. Mathematical functions
7. Memory managment

7.1 Memory clear functions
7.2 Memory copy functions
7.3 Memory fill functions

8. Joystick handling functions
9. Player option functions
10. Reset and initializition functions
11. Score functions
12. Sound functions
13. Vector beam positioning functions
14. Vector brightness functions
15. Vector object handling functions

15.1. Object collision detection functions
15.2 Rotating functions

1. Calibration/vector reset functions

Check0Ref ($F34F)
Recalibrate ($F2E6)
Reset_Pen ($F35B)
Reset0Int ($F36B)
Reset0Ref ($F354)
Reset0Ref_D0 ($F34A)
Set_Refresh ($F1A2)
Wait_Recal ($F192)

2. Counter handling functions

Dec_3_Counters ($F55A)
Dec_6_Counters ($F55E)
Dec_Counters ($F563)

3. Day to day functions

Bitmask_a ($F57E)
Dec_3_Counters ($F55A)
Dec_6_Counters ($F55E)
Dec_Counters ($F563)
DP_to_C8 ($F1AF)
DP_to_D0 ($F1AA)
Print_Ships_x ($F391)
Print_Ships ($F393)
Random ($F517)
Random_3 ($F511)

4. Delay functions

Delay_0 ($F579)
Delay_1 ($F575)
Delay_2 ($F571)
Delay_3 ($F56D)
Delay_b ($F57A)
Delay_RTS ($F57D)

5. Drawing functions

5.1 Dot functions

Dot_d ($F2C3)
Dot_here ($F2C5)
Dot_ix_b ($F2BE)
Dot_ix ($F2C1)
Dot_List ($F2D5)
Dot_List_Reset ($F2DE)

5.2 String functions

Print_Str_d ($F37A)
Print_List ($F38A)
Print_List_chk ($F38C)
Print_List_hw ($F385)
Print_Str ($F495)
Print_Str_hwyx ($F373)
Print_Str_yx ($F378)

5.3 Vector functions

5.3.1 Drawing only

Draw_Grid_VL ($FF9F)
Draw_Line_d ($F3DF)
Draw_Pat_VL ($F437)
Draw_Pat_VL_a ($F434)
Draw_Pat_VL_d ($F439)
Draw_VL ($F3DD)
Draw_VL_a ($F3DA)
Draw_VL_ab ($F3D8)
Draw_VL_b ($F3D2)
Draw_VL_mode ($F46E)
Draw_VLc ($F3CE)
Draw_VLcs ($F3D6)
Draw_VLp ($F410)
Draw_VLp_7F ($F408)
Draw_VLp_b ($F40E)
Draw_VLp_FF ($F404)
Draw_VLp_scale ($F40C)

5.3.2 Drawing and moving

Mov_Draw_VL ($F3BC)
Mov_Draw_VL_ab ($F3B7)
Mov_Draw_VL_a ($F3B9)
Mov_Draw_VL_d ($F3BE)
Mov_Draw_VLc_a ($F3AD)
Mov_Draw_VLc_b ($F3B1)
Mov_Draw_VLcs ($F3B5)

6. Mathematical functions

Abs_a_b ($F584)
Abs_b ($F58B)
Bitmask_a ($F57E)

7. Memory managment

7.1 Memory clear functions

Clear_C8_RAM ($F542)
Clear_x_b ($F53F)
Clear_x_d ($F548)
Clear_x_256 ($F545)
Clear_Score ($F84F)
Clear_Sound ($F272)

7.2 Memory copy functions

Move_Mem_a ($F683)
Move_Mem_a_1 ($F67F)

7.3 Memory fill functions

Clear_x_b_80 ($F550)
Clear_x_b_a ($F552)

8. Joystick handling functions

Joy_Analog ($F1F5)
Joy_Digital ($F1F8)
Read_Btns_Mask ($F1B4)
Read_Btns ($F1BA)

9. Player option functions

Display_Option ($F835)
Select_Game ($F7A9)

10. Reset and initializition functions

Cold_Start ($F000)
Init_OS ($F18B)
Init_OS_RAM ($F164)
Init_VIA ($F14C)
Recalibrate ($F2E6)
Reset_Pen ($F35B)
Reset0Int ($F36B)
Reset0Ref ($F354)
Reset0Ref_D0 ($F34A)
Wait_Recal ($F192)
Warm_Start ($F06C)

11. Score functions

Add_Score_a ($F85E)
Add_Score_d ($F87C)
Clear_Score ($F84F)
Compare_Score ($F8C7)
New_High_Score ($F8D8)
Strip_Zeros ($F8B7)

12. Sound functions

Clear_Sound ($F272)
Do_Sound ($F289)
Do_Sound_x ($F28C)
Init_Music ($F68D)
Init_Music_Buf ($F533)
Init_Music_chk ($F687)
Init_Music_dft ($F692)
Explosion_Snd ($F92E)
Sound_Byte ($F256)
Sound_Byte_x ($F259)
Sound_Byte_raw ($F25B)
Sound_Bytes ($F27D)
Sound_Bytes_x ($F284)

13. Vector beam positioning functions

Check0Ref ($F34F)
Moveto_d ($F312)
Moveto_d_7F ($F2FC)
Moveto_ix ($F310)
Moveto_ix_7F ($F30C)
Moveto_ix_b ($F30E)
Moveto_ix_FF ($F308)
Moveto_x_7F ($F2F2)
Reset_Pen ($F35B)
Reset0Int ($F36B)
Reset0Ref ($F354)
Reset0Ref_D0 ($F34A)
Wait_Recal ($F192)

14. Vector brightness functions

Intensity_1F ($F29D)
Intensity_3F ($F2A1)
Intensity_5F ($F2A5)
Intensity_7F ($F2A9)
Intensity_a ($F2AB)
Reset_Pen ($F35B)
Wait_Recal ($F192)

15. Vector object handling functions

15.1 Object collision detection functions

Obj_Hit ($F8FF)
Obj_Will_Hit ($F8F3)
Obj_Will_Hit_u ($F8E5)

15.2 Rotating functions

Get_Rise_Idx ($F5D9)
Get_Run_Idx ($F5DB)
Rise_Run_Angle ($F593)
Rise_Run_Idx ($F5EF)
Rise_Run_Len ($F603)
Rise_Run_X ($F5FF)
Rise_Run_Y ($F601)
Rot_VL ($F616)
Rot_VL_ab ($F610)
Rot_VL_M_dft ($F62B)
Rot_VL_Mode ($F61F)
Xform_Rise ($F663)
Xform_Rise_a ($F661)
Xform_Run ($F65D)
Xform_Run_a ($F65B)

Alphabetically ordered:

A
Abs_a_b ($F584)
Abs_b ($F58B)
Add_Score_a ($F85E)
Add_Score_d ($F87C)

B
Bitmask_a ($F57E)

C
Check0Ref ($F34F)
Clear_C8_RAM ($F542)
Clear_Score ($F84F)
Clear_Sound ($F272)
Clear_x_256 ($F545)
Clear_x_b ($F53F)
Clear_x_b_80 ($F550)
Clear_x_b_a ($F552)
Clear_x_d ($F548)
Cold_Start ($F000)
Compare_Score ($F8C7)

D
Dec_3_Counters ($F55A)
Dec_6_Counters ($F55E)
Dec_Counters ($F563)
Delay_0 ($F579)
Delay_1 ($F575)
Delay_2 ($F571)
Delay_3 ($F56D)
Delay_b ($F57A)
Delay_RTS ($F57D)
Display_Option ($F835)
Do_Sound ($F289)
Do_Sound_x ($F28C)
Dot_d ($F2C3)
Dot_here ($F2C5)
Dot_ix_b ($F2BE)
Dot_ix ($F2C1)
Dot_List ($F2D5)
Dot_List_Reset ($F2DE)
DP_to_C8 ($F1AF)
DP_to_D0 ($F1AA)
Draw_Grid_VL ($FF9F)
Draw_Line_d ($F3DF)
Draw_Pat_VL ($F437)
Draw_Pat_VL_a ($F434)
Draw_Pat_VL_d ($F439)
Draw_VL ($F3DD)
Draw_VL_a ($F3DA)
Draw_VL_ab ($F3D8)
Draw_VL_b ($F3D2)
Draw_VL_mode ($F46E)
Draw_VLc ($F3CE)
Draw_VLcs ($F3D6)
Draw_VLp ($F410)
Draw_VLp_7F ($F408)
Draw_VLp_b ($F40E)
Draw_VLp_FF ($F404)
Draw_VLp_scale ($F40C)

E
Explosion_Snd ($F92E)

G
Get_Rise_Idx ($F5D9)
Get_Run_Idx ($F5DB)

I
Init_Music ($F68D)
Init_Music_Buf ($F533)
Init_Music_chk ($F687)
Init_Music_dft ($F692)
Init_OS ($F18B)
Init_OS_RAM ($F164)
Init_VIA ($F14C)
Intensity_1F ($F29D)
Intensity_3F ($F2A1)
Intensity_5F ($F2A5)
Intensity_7F ($F2A9)
Intensity_a ($F2AB)

J
Joy_Analog ($F1F5)
Joy_Digital ($F1F8)

M
Mov_Draw_VL ($F3BC)
Mov_Draw_VL_ab ($F3B7)
Mov_Draw_VL_a ($F3B9)
Mov_Draw_VL_d ($F3BE)
Mov_Draw_VLc_a ($F3AD)
Mov_Draw_VLc_b ($F3B1)
Mov_Draw_VLcs ($F3B5)
Move_Mem_a ($F683)
Move_Mem_a_1 ($F67F)
Moveto_d ($F312)
Moveto_d_7F ($F2FC)
Moveto_ix ($F310)
Moveto_ix_7F ($F30C)
Moveto_ix_b ($F30E)
Moveto_ix_FF ($F308)
Moveto_x_7F ($F2F2)

N
New_High_Score ($F8D8)

O
Obj_Hit ($F8FF)
Obj_Will_Hit ($F8F3)
Obj_Will_Hit_u ($F8E5)

P
Print_Str_d ($F37A)
Print_List ($F38A)
Print_List_chk ($F38C)
Print_List_hw ($F385)
Print_Ships_x ($F391)
Print_Ships ($F393)
Print_Str ($F495)
Print_Str_hwyx ($F373)
Print_Str_yx ($F378)

R
Random ($F517)
Random_3 ($F511)
Read_Btns_Mask ($F1B4)
Read_Btns ($F1BA)
Recalibrate ($F2E6)
Reset_Pen ($F35B)
Reset0Int ($F36B)
Reset0Ref ($F354)
Reset0Ref_D0 ($F34A)
Rise_Run_Angle ($F593)
Rise_Run_Idx ($F5EF)
Rise_Run_Len ($F603)
Rise_Run_X ($F5FF)
Rise_Run_Y ($F601)
Rot_VL ($F616)
Rot_VL_ab ($F610)
Rot_VL_M_dft ($F62B)
Rot_VL_Mode ($F61F)

S
Select_Game ($F7A9)
Set_Refresh ($F1A2)
Sound_Byte ($F256)
Sound_Byte_x ($F259)
Sound_Byte_raw ($F25B)
Sound_Bytes ($F27D)
Sound_Bytes_x ($F284)
Strip_Zeros ($F8B7)

W
Wait_Recal ($F192)
Warm_Start ($F06C)

X
Xform_Rise ($F663)
Xform_Rise_a ($F661)
Xform_Run ($F65D)
Xform_Run_a ($F65B)

Other Rom Addresses

$F9DC Bit_Masks
$F9E4 Music_Table_1
$F9EA Music_Table_2
$F9F0 Recal_Points
$F9F4 Char_Table
$FC24 angle_data1
$FC2C angle_data2
$FC6D rotation_pair_table
$FC8D Freq_Table
$FD0D power-on music and music for Crazy Coaster and Narrow Escape
$FD1D music for Berzerk
$FD69 ADSR table for Berzerk and FF7A
$FD79 twang table for Berzerk and Scramble
$FD81 music
$FDC3 ADSR table for FD81 and FF8F
$FDD3 music for Scramble
$FE28 ADSR table for Scramble, FF26, FF44, FF62
$FE38 music for Solar Quest
$FE66 ADSR table for Solar Quest
$FE76 music
$FEB2 ADSR table for FE76
$FEB6 "flat" twang table
$FEC6 music
$FEE8 ADSR table for FEC6
$FEF8 music for Melody Master
$FF16 ADSR table for FEF8
$FF26 music
$FF44 music
$FF62 music
$FF7A music
$FF8F music

ROM Reference (by Bruce Tomlin)

Addr    Name            DP      Inreg   Outreg  Trashreg
----    --------------- ---     ------- ------- --------
F000    Start           --              --      --
F06C    Warm_Start      --              --      --
F14C    INIT_VIA        =D0             DP      D,X
F164    Init_OS_RAM     =C8             DP      D,X
F18B    Init_OS         =D0             DP      D,X
F192    Wait_Recal      =D0             DP      D,X
F1A2    Set_Refresh     D0                      D
F1AA    DP_to_D0        =D0             A,DP
F1AF    DP_to_C8        =C8             A,DP
F1B4    Read_Btns_Mask  D0      A       A       B,X
F1BA    Read_Btns       D0              A       B,X
F1F5    Joy_Analog      D0                      D,X
F1F8    Joy_Digital     D0                      D,X
F256    Sound_Byte      D0              X       D
F259    Sound_Byte_x    D0      A,B,X           D
F25B    Sound_Byte_raw  D0
F272    Clear_Sound     D0                      D,X
F27D    Sound_Bytes     D0      U               D,X,U
F284    Sound_Bytes_x   D0      X,U             D,X,U
F289    Do_Sound        D0                      D,X,U
F28C    Do_Sound_x      D0                      D,X,U
F29D    Intensity_1F    D0                      D
F2A1    Intensity_3F    D0                      D
F2A5    Intensity_5F    D0                      D
F2A9    Intensity_7F    D0                      D
F2AB    Intensity_a     D0      A               D
F2BE    Dot_ix_b        D0      B,X             D
F2C1    Dot_ix          D0      X               D
F2C3    Dot_d           D0      A,B             D
F2C5    Dot_here        D0                      D
F2D5    Dot_List        D0      X       X       D
F2DE    Dot_List_Reset  D0      X       X       D
F2E6    Recalibrate     D0                      D,X
F2F2    Moveto_x_7F     D0      X               D
F2FC    Moveto_d_7F     D0      A,B             D
F308    Moveto_ix_FF    D0      X       X       D
F30C    Moveto_ix_7F    D0      X       X       D
F30E    Moveto_ix_a     D0      X,A     X       D
F310    Moveto_ix       D0      X       X       D
F312    Moveto_d        D0              A,B     D
F34A    Reset0Ref_D0    =D0             DP      D
F34F    Check0Ref       D0                      D
F354    Reset0Ref       D0                      D
F35B    Reset_Pen       D0                      D
F36B    Reset0Int       D0                      D
F373    Print_Str_hwyx  D0      U       U       D,X
F378    Print_Str_yx    D0      U       U       D,X
F37A    Print_Str_d     D0      A,B,U   U       D,X
F385    Print_List_hw   D0      U       U       D,X
F38A    Print_List      D0      U       U       D,X
F38C    Print_List_chk  D0      U       U       D,X
F391    Print_Ships_x   D0      A,B,X           D,X,U
F393    Print_Ships     D0      A,B,X           D,X,U
F3AD    Mov_Draw_VLc_a  D0      X       X       D       count y x y x ...
F3B1    Mov_Draw_VL_b   D0      B,X     X       D       y x y x ...
F3B5    Mov_Draw_VLcs   D0      X       X       D       count scale y x ...
F3B7    Mov_Draw_VL_ab  D0      A,B,X   X       D       y x y x ...
F3B9    Mov_Draw_VL_a   D0      A,X     X       D       y x y x ...
F3BC    Mov_Draw_VL     D0      X       X       D       y x y x ...
F3BE    Mov_Draw_VL_d   D0      D,X     X       D       y x y x ...
F3CE    Draw_VLc        D0      X       X       D       count y x y x ...
F3D2    Draw_VL_b       D0      B,X     X       D       y x y x ...
F3D6    Draw_VLcs       D0      X       X       D       count scale y x ...
F3D8    Draw_VL_ab      D0      A,B,X   X       D       y x y x ...
F3DA    Draw_VL_a       D0      A,X     X       D       y x y x ...
F3DD    Draw_VL         D0      X       X       D       y x y x ...
F3DF    Draw_Line_d     D0      A,B     X       D       y x y x ...
F404    Draw_VLp_FF     D0      X       X       D       pat y x ... $01
F408    Draw_VLp_7F     D0      X       X       D       pat y x ... $01
F40C    Draw_VLp_scale  D0      X       X       D       scale pat y x ... $01
F40E    Draw_VLp_b      D0      B,X     X       D       pat y x ... $01
F410    Draw_VLp        D0      X       X       D       pat y x ... $01
F434    Draw_Pat_VL_a   D0      A,X     X       D       y x y x ...
F437    Draw_Pat_VL     D0      X       X       D       y x y x ...
F439    Draw_Pat_VL_d   D0      D,X     X       D       y x y x ...
F46E    Draw_VL_mode    D0      X       X       D       mode y x ... $01
F495    Print_Str       D0      U       U       D,X
F511    Random_3        --              A
F517    Random          --              A
F533    Init_Music_Buf  --                      D,X
F53F    Clear_x_b       --      B,X     D
F542    Clear_C8_RAM    --              D,X
F545    Clear_x_256     --      X       D
F548    Clear_x_d       --      D,X     D
F550    Clear_x_b_80    --      B,X     A,B
F552    Clear_x_b_a     --      A,B,X   B
F55A    Dec_3_Counters  --              X,B
F55E    Dec_6_Counters  --              X,B
F563    Dec_Counters    --      B,X     B
F56D    Delay_3         --              B               30 cycles
F571    Delay_2         --              B               25 cycles
F575    Delay_1         --              B               20 cycles
F579    Delay_0         --              B               12 cycles
F57A    Delay_b         --      B       B               5*B + 10 cycles
F57D    Delay_RTS       --                              5 cycles
F57E    Bitmask_a       --      A       A       X
F584    Abs_a_b         --      A,B     A,B
F58B    Abs_b           --      B       B
F593    Rise_Run_Angle  C8      A,B     A,B
F5D9    Get_Rise_Idx    --      A       A,B     X
F5DB    Get_Run_Idx     --      A       A,B     X
F5EF    Rise_Run_Idx    C8                      D
F5FF    Rise_Run_X      C8      A,B
F601    Rise_Run_Y      C8      A,B
F603    Rise_Run_Len    C8      A,B     A,B
F610    Rot_VL_ab       =C8     A,B,X,U DP,X,U  D       y x y x ...
F616    Rot_VL          =C8     X,U     DP,X,U  D       y x y x ...
F61F    Rot_VL_Mode     C8      A,X,U   X,U     D       mode y x ... $01
F62B    Rot_VL_M_dft    C8      X,U     X,U     D       mode y x ... $01
F65B    Xform_Run_a     C8      A       A       B
F65D    Xform_Run       C8              A       B
F661    Xform_Rise_a    C8      A       A       B
F663    Xform_Rise      C8              A       B
F67F    Move_Mem_a_1    --      A,X,U   A,B
F683    Move_Mem_a      --      A,X,U   A,B
F687    Init_Music_chk  C8      U               D,X,Y,U
F68D    Init_Music      C8      U               D,X,Y,U
F692    Init_Music_dft  C8      U               D,X,Y,U
F7A9    Select_Game     =C8     A,B     DP      D,X,Y
F835    Display_Option  D0      A,Y             D,X,U
F84F    Clear_Score     --      X               D
F85E    Add_Score_a     --      A,X,U           D
F87C    Add_Score_d     --      D,X,U           D
F8B7    Strip_Zeros     --      B,X             D
F8C7    Compare_Score   --      X,U     A       B
F8D8    New_High_Score  --      X,U             X,U,D
F8E5    Obj_Will_Hit_u  --      D,X,Y,U C-flag
F8F3    Obj_Will_Hit    --      D,X,Y,U C-flag
F8FF    Obj_Hit         --      D,X,Y   C-flag
F92E    Explosion_Snd   C8      U               D,X
FF9F    Draw_Grid_VL    D0      X,Y     X,Y     D

Vectrex Programming Tutorial Index

Back to Vectrex Programming Docs Index - Back to Programming TOC Index
 
 

 


Vectrex Last Minute RSS

Related Links and sources

Please note

The Museums Staff can not answer any programming related questions. If you have extra info about this page, if you noticed errors, please help to maintain this site. Please send us the information you have.

 

 

Back to Programming Docs Index
 
 

vectrexmuseum.com