MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

Minwah
MAMEWAH Chief!
Reged: 09/23/03
Posts: 5096
Loc: Oxfordshire, England
Send PM


(Vectrex) Assembler prob...
#194093 - 06/23/09 10:25 PM Attachment: sound2.txt 7 KB (7 downloads)


A long time ago I downloaded some sample vectrex source code and adapted one particular program to play a little tune I transposed from guitar...

Anyway, I could never get the program to repeat the main procedure (even in the sample before I started messing with it). Here is a snippet:


Code:

main_loop:
JSR DP_to_C8 ; DP to RAM
LDU #yankee ; get some music, here yankee
JSR Init_Music_chk ; and init new notes
JSR Wait_Recal ; Vectrex BIOS recalibration
JSR Do_Sound ; ROM function that does the
; sound playing
BRA main_loop ; and repeat forever



It is as if the last line isn't doing anything. I'm not great with assembler so any help would be appreciated. Attached is the complete code and assembly 'log'.

Oh, and I'm using the AS09 assembler (http://www.kingswood-consulting.co.uk/assemblers/), but v1.32.

Edit: btw close your ears if you happen to compile/run this. It sounds bloody awful...

Edited by Minwah (06/23/09 10:28 PM)



Minwah
MAMEWAH Chief!
Reged: 09/23/03
Posts: 5096
Loc: Oxfordshire, England
Send PM


LOG [nt] new [Re: Minwah]
#194094 - 06/23/09 10:26 PM Attachment: sound2.txt 47 KB (9 downloads)


-



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: (Vectrex) Assembler prob... new [Re: Minwah]
#194454 - 06/26/09 10:08 PM


> A long time ago I downloaded some sample vectrex source code and adapted one
> particular program to play a little tune I transposed from guitar...
>
> Anyway, I could never get the program to repeat the main procedure (even in the
> sample before I started messing with it). Here is a snippet:
>
> main_loop:
> JSR DP_to_C8 ; DP to RAM
> LDU #yankee ; get some music, here yankee
> JSR Init_Music_chk ; and init new notes
> JSR Wait_Recal ; Vectrex BIOS recalibration
> JSR Do_Sound ; ROM function that does the
> ; sound playing
> BRA main_loop ; and repeat forever

I would assume that Do_Sound is never returning. Try running it in an emulator with a good debugger (like MESS) and see if it even makes it to the BRA.



Minwah
MAMEWAH Chief!
Reged: 09/23/03
Posts: 5096
Loc: Oxfordshire, England
Send PM


Re: (Vectrex) Assembler prob... new [Re: R. Belmont]
#194814 - 06/30/09 04:14 PM


> I would assume that Do_Sound is never returning. Try running it in an emulator with a
> good debugger (like MESS) and see if it even makes it to the BRA.

Many thanks, I will give this a shot!


Pages: 1

MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Pi 
0 registered and 49 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 3875