Help Compiling/running STSpeech.s

All 680x0 related coding posts in this section please.

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

aag
Atari freak
Atari freak
Posts: 50
Joined: Wed May 09, 2007 9:20 pm
Location: West Yorkshire, UK
Contact:

Help Compiling/running STSpeech.s

Postby aag » Fri Jul 06, 2012 9:45 pm

Hi

I'm a real novice at 68k but I stumpled across the source code for STSpeech in the below post and thought I'd have a go at compiling it/see how it worked :-

viewtopic.php?f=16&t=2254&start=25
post by by earx » Sat Aug 19, 2006 12:30 pm - towards the bottom.

I've got devpac3 (located from https://sites.google.com/site/stessenti ... ent/devpac), runing on STeem (under an xp laptop,). (The Steem config 4mb ram, tos 2.06 (uk) - 8mhz ).

It took a while to find the options->prefernces to up the editor/buffer from 60000 to 200000 so that I could even load STSPEECH.S in the first place.

I went to options, control - format atari executable and set an output of c:\out.tos

Then program assemble - the code builds ok.

I then close devpack, run out.tos - I get the welcome scren and prompt - but then if I type any text - I get bombs!!!! (And I don't have the know how (yet) on how to debug it).

Am I doing anything wrong???? (I know the pureC/godlib needed steem with tos 2.06) - just wondering if its me, config or if there's something amiss in the actual source?

Thanks in advance!

Andy

aag
Atari freak
Atari freak
Posts: 50
Joined: Wed May 09, 2007 9:20 pm
Location: West Yorkshire, UK
Contact:

Re: Help Compiling/running STSpeech.s

Postby aag » Sat Jul 07, 2012 6:17 pm

I've done a bit of debugging - SMC (self modify code?) is defined as 0

I think its bombing in

Code: Select all

L31cc:   

  move.l   (a0)+,wave_params
  move.w   (a0)+,wave_params+4


wave_params:
wave_a_step:
   ds.b   1




I'm still reading the devpac manual on debugging.

Any help gratefully received!
You do not have the required permissions to view the files attached to this post.

User avatar
Klapauzius
The Klaz
The Klaz
Posts: 4302
Joined: Sun Jul 04, 2004 7:55 am
Location: Bavaria
Contact:

Re: Help Compiling/running STSpeech.s

Postby Klapauzius » Sat Jul 07, 2012 6:27 pm

Hi,

try to insert an EVEN directive in front of the definition of wave_params near the end of the source file.
The label wave_params may not be word aligned, so a move.l to this address would crash.

Code: Select all

USE_PITC
  DC.B      'M',$00,$00

 BSS

        EVEN

wave_params:
wave_a_step:
   ds.b   1
http://www.klapauzius.net
http://dbug.kicks-ass.net/klaz

The tears are welling in my eyes again, I need twenty big buckets to catch them in, twenty pretty girls to carry them down, twenty deep holes to bury them in.

aag
Atari freak
Atari freak
Posts: 50
Joined: Wed May 09, 2007 9:20 pm
Location: West Yorkshire, UK
Contact:

Re: Help Compiling/running STSpeech.s

Postby aag » Sat Jul 07, 2012 10:41 pm

Thanks for the suggestion

If I add the EVEN where you suggested

Code: Select all


 BSS

EVEN

wave_params:
wave_a_step:
   ds.b   1
wave_a_amp:
   ds.b   1
wave_b_step:
   ds.b   1



it still crashes (see the even1.png) - but the debugger is referencing a EVEN label???

EVEN1.PNG


The devpac manual seems to say to place the even after the label, so I tried

Code: Select all

 BSS
wave_params:EVEN
wave_a_step:EVEN
   ds.b   1
wave_a_amp:EVEN
   ds.b   1
wave_b_step:EVEN
   ds.b   1
wave_b_amp:EVEN
   ds.b   1
wave_c_step:EVEN
   ds.b   1
wave_c_amp:EVEN
   ds.b   1

wave_pos:EVEN
wave_a_pos: EVEN
   ds.b   1
wave_b_pos:EVEN
   ds.b   1
wave_c_pos:EVEN
   ds.b   1         A,B,C positions

hiss_params:EVEN
hiss_a_step:EVEN
   ds.b   1
hiss_a_amp:EVEN
   ds.b   1
hiss_b_step:EVEN
   ds.b   1
hiss_b_amp:EVEN
   ds.b   1

hiss_a_pos:EVEN
   ds.b   1
hiss_b_pos:EVEN
   ds.b   1

L00E3:EVEN
  DS.B      1
L00E4:EVEN
  DS.B      256
PHOBUFF:EVEN
  DS.B      257
L00E6:EVEN
  DS.W      1
L00E7:EVEN
  DS.B      256
ZUEND: END



But it still crashes (see even2.png).

EVEN2.PNG



Any other suggetsions?? Thanks
You do not have the required permissions to view the files attached to this post.

User avatar
Klapauzius
The Klaz
The Klaz
Posts: 4302
Joined: Sun Jul 04, 2004 7:55 am
Location: Bavaria
Contact:

Re: Help Compiling/running STSpeech.s

Postby Klapauzius » Sun Jul 08, 2012 6:56 am

Seems that A0 points to an odd address. A move.l will cause a crash in this case.

Try to replace these two lines:

Code: Select all

move.l   (a0)+,wave_params
move.w   (a0)+,wave_params+4


with something like that:

Code: Select all

      movem.l    d0/a1,-(a7)
      lea        wave_params(pc),a1
      moveq      #5,d0
Lcop1:   
      move.b   (a0)+,(a1)+
      dbra       d0,Lcop1
      movem.l    (a7)+,d0/a1
http://www.klapauzius.net
http://dbug.kicks-ass.net/klaz

The tears are welling in my eyes again, I need twenty big buckets to catch them in, twenty pretty girls to carry them down, twenty deep holes to bury them in.

aag
Atari freak
Atari freak
Posts: 50
Joined: Wed May 09, 2007 9:20 pm
Location: West Yorkshire, UK
Contact:

Re: Help Compiling/running STSpeech.s

Postby aag » Tue Jul 10, 2012 8:07 pm

Yes that code change works!

Thanks a lot!

Andy

User avatar
Nyh
Atari God
Atari God
Posts: 1496
Joined: Tue Oct 12, 2004 2:25 pm
Location: Netherlands

Re: Help Compiling/running STSpeech.s

Postby Nyh » Wed Jul 11, 2012 9:25 am

The original code reads:

Code: Select all

L31cc:   
  addq.l     #1,a0
  move.l   (a0)+,wave_params
  move.w   (a0)+,wave_params+4

I think the addq.l makes a BIG difference in the bombing department.

Hans Wessels


Social Media

     

Return to “680x0”

Who is online

Users browsing this forum: No registered users and 2 guests