Jump to content
IGNORED

basic compiler


rocky007

Recommended Posts

Suggestion (I did this with the original Honeycomb Rapture demo)--- put your key-check in a GOSUB.. not in the main game loop--- then branch to it 3 or 4 times in your game loop instead of just once... Immediate response improvement. At least for my application. :). With compiled speed, it shouldn't cost you anything.

Link to comment
Share on other sites

Suggestion (I did this with the original Honeycomb Rapture demo)--- put your key-check in a GOSUB.. not in the main game loop--- then branch to it 3 or 4 times in your game loop instead of just once... Immediate response improvement. At least for my application. :). With compiled speed, it shouldn't cost you anything.

 

That works for a sprite, but not for character animation... Basically, I want it responsive, but not wrong. Not quite sure how to do that... :)

 

What I'm thinking is that in the delay period - monitor the joystick - and track any motion - and if there is a motion, hold that it occurred and use that retained value, even if it gets unset later in the loop - basically if someone taps joystick in a way, but then releases, we still want the motion... Maybe? I should experiment with it for sure.

Link to comment
Share on other sites

Not all that clean--- I threw this together in about an hour... should have taken some more time with it, but you'll get the point. =)

 

 

Is that why the video is unavailable? That's pretty dirty, as you suggest. :)

 

Yeah, it was the processing - oooh, and thanks for the shout-out!

Edited by unhuman
Link to comment
Share on other sites

Ok - I've updated BloxoTIz to be compiled. Everything seems to work... Even found a bug in the compiler!

 

3. Detect key state logic by myself. the "S" in the CALL KEY(1, K, S) doesn't work properly. The K is fine. I use this to prevent flipping back and forth repeatedly when your block is split.

 

Is this related to the compiler? In my programs, I am using a simple IF S ... to detect key presses. It works when not compiled, and I have not yet moved to a stage where I am ready to run through the compiler.

Link to comment
Share on other sites

Ok - I've updated BloxoTIz to be compiled. Everything seems to work... Even found a bug in the compiler!

 

3. Detect key state logic by myself. the "S" in the CALL KEY(1, K, S) doesn't work properly. The K is fine. I use this to prevent flipping back and forth repeatedly when your block is split.

 

Is this related to the compiler? In my programs, I am using a simple IF S ... to detect key presses. It works when not compiled, and I have not yet moved to a stage where I am ready to run through the compiler.

 

I think it was the compiler - worked fine in B/XB. It seems to work fine compiled with 0,K,S (which I use out-of-game), but not with 1,K,S (which I use in-game-loop)

 

So, I just used my own flag.

Link to comment
Share on other sites

Ok - I've updated BloxoTIz to be compiled. Everything seems to work... Even found a bug in the compiler!

 

3. Detect key state logic by myself. the "S" in the CALL KEY(1, K, S) doesn't work properly. The K is fine. I use this to prevent flipping back and forth repeatedly when your block is split.

 

Is this related to the compiler? In my programs, I am using a simple IF S ... to detect key presses. It works when not compiled, and I have not yet moved to a stage where I am ready to run through the compiler.

 

I think it was the compiler - worked fine in B/XB. It seems to work fine compiled with 0,K,S (which I use out-of-game), but not with 1,K,S (which I use in-game-loop)

 

So, I just used my own flag.

 

I suppose so long as K still returns -1 in the absence of a key press, I can work without S. Will require a few source changes, but obviously doable.

Link to comment
Share on other sites

  • 5 months later...

i can believe it Xcom was on ebay....http://newsgroups.derkeiler.com/Archive/Comp/comp.sys.ti/2007-11/msg00005.html... and no trace nowhere.

 

SST look also very interesting, i'm trying to put it on disk, and try with real hardware... i installed omniflop, but my old 5 1/4 floppy don't work. I tryed to connect the TI99 one, it looks working ( starting under windows ), but reconize nothing.

 

Opry99er, how did u installed a 3 1/2 in TI99 ? you remplaced some circuit in disk controller ?

 

Hello,

 

Can you put on the forum your version of SST compiler ? You talk about it so much BUT don't put it here.

I m also interested by other compilers (except whilhelm compiler which I have) .

Link to comment
Share on other sites

Slow-down could be as simple as 2 or 3 delay loops within the game loop.

Ideally, you want to use an interrupt handler to increment a variable every vertical blank.

Then the busy loop just clears the variable and waits for a certain number of vertical blanks to take place.

Then your code should always run at the same speed even if someone has a 25MHz clone in an FPGA.

Link to comment
Share on other sites

 

Can you also put on the forum this compiler by Peter Krull ?

It's here ... http://www.atariage.com/forums/topic/185936-at-least-dsk-image-from-my-collection

 

icon_smile.gif

 

I can't find how to compile with this one. The options 1, 3 and 4 (BASIC, FP-LOADER and INT-LOADER) work.

When I press option 2 (COMPILER), it asks me for a basic file to load, that works. Then it asks for an output filename, I type "DSK1.TEST". Then it scrambles the pattern table and lists the disk contents (I can press PROC'D to list another screen or ENTER to go back to menu). No output file is generated...

 

Basic%20Compiler.PNG

Edited by lucien2
Link to comment
Share on other sites

from my side, it working perfect, but only on real TI99.

I thought MESS was emulating the disks 100% correctly.

 

Maybe a file was corrupted during transfer. There is a strange file on the disk.

 

Basic%20Compiler%20Disk%20Contents.PNG

 

Did anyone tried this DSK image on a real TI?

Edited by lucien2
Link to comment
Share on other sites

on real TI it's working perfect.

 

I already saw that video, I believe you. ;)

 

But is it running with a floppy generated from the DSK image you posted or is it running with the original floppy?

 

What I was guessing is that a problem occured when you created the DSK image. Do you have this strange file (awe..jf..w) on the original floppy?

Link to comment
Share on other sites

  • 3 weeks later...

Hello everyone, I was wandering if any of you could spare the time to help me out.

 

I have recently got hold of Harry Wilhelm's compiler, and I watched Opry99er's excellent video tutorial on how to compile from BASIC.

Indeed, I followed Opry99er's instructions to the letter and now have no problem at all in compiling with Wilhelms.

 

The problem I'm having is this;

 

I make a BASIC game, and it IS simple, it has hardly any multiple statement lines, kept simple etc ... BUT ... when it runs, the compiled version often crashes .... Let me show you an example;

 

For example, I did this;

 

10 CALL CLEAR

20 CALL SCREEN(2)

30 FOR L=1 TO 14

40 CALL COLOR(L,16,2)

50 NEXT L

 

60 CALL CHAR(35,"18997E3C3CBDFF5A")::! FROG

70 CALL CHAR(36,"66FFDBDBDBDBFF66")::! CAR

 

80 X=24

90 DIM C(4)

100 C(1)=1

110 C(2)=4

120 C(3)=8

130 C(4)=12

 

150 CALL HCHAR(X,12,35)

155 CALL KEY(0,K,S)

160 CALL HCHAR(12,1,32,32):: CALL HCHAR(12,C(1),36)::CALL HCHAR(X,12,35)

161 CALL GCHAR(12,C(1),W)::IF W=35 THEN 1000

170 CALL HCHAR(14,1,32,32):: CALL HCHAR(14,C(2),36)::CALL HCHAR(X,12,35)

175 CALL GCHAR(14,C(2),W)::IF W=35 THEN 1000

180 CALL HCHAR(16,1,32,32):: CALL HCHAR(16,C(3),36)::CALL HCHAR(X,12,35)

185 CALL GCHAR(16,C(3),W)::IF W=35 THEN 1000

190 CALL HCHAR(18,1,32,32):: CALL HCHAR(18,C(4),36)::CALL HCHAR(X,12,35)

191 CALL GCHAR(18,C(4),W)::IF W=35 THEN 1000

192 C(1)=C(1)+1::IF C(1)=31 THEN C(1)=1

193 C(2)=C(2)+1::IF C(2)=31 THEN C(2)=1

194 C(3)=C(3)+1::IF C(3)=31 THEN C(3)=1

195 C(4)=C(4)+1::IF C(4)=31 THEN C(4)=1

200 CALL GCHAR(X,12,Q)::IF Q=36 THEN 1000

205 IF S=0 THEN 155

210 IF K=69 THEN 500

220 IF K=88 THEN 600

230 GOTO 155

 

500 CALL HCHAR(X,12,32)

505 X=X-1::IF X=1 THEN 2000

510 CALL GCHAR(X,12,Q)::IF Q=36 THEN 1000

520 GOTO 150

 

600 CALL HCHAR(X,12,32)

605 X=X+1::IF X=25 THEN X=24

610 GOTO 510

 

1000 FOR L=660 TO 110 STEP -50

1010 CALL SOUND(1,L,1)

1020 NEXT L

1030 CALL CLEAR

1040 X=24

1050 GOTO 100

 

2000 FOR L=110 TO 660 STEP 50

2010 CALL SOUND(1,L,1)

2020 NEXT L

2030 CALL CLEAR

2040 X=24

2050 GOTO 100

 

 

This program works without error or bugs on XB, and the 'frog' gets caught by the 'cars' each time one hits it.

However; with the compiled version, as soon as C(1)=31, it does'nt go back to 1 like it should. This is the same

for all assigned C(x) variables. Instead, the game locks up and crashes!!!

 

I've had this problem with a few tests I've made, I don't know if it's my syntax (which is ALWAYS questionable) or

whatever else.

 

Basically it's when a variable hits the end of the line, column no.31, i want it to go back to column no.1 , and it just

locks up.

 

192 C(1)=C(1)+1::IF C(1)=31 THEN C(1)=1

193 C(2)=C(2)+1::IF C(2)=31 THEN C(2)=1

194 C(3)=C(3)+1::IF C(3)=31 THEN C(3)=1

195 C(4)=C(4)+1::IF C(4)=31 THEN C(4)=1

 

The game allows all movement to take place, encounters every collision, but only lasts until the cars get from column 1 to column 32, which in assembly makes my game very very quick to end and lock.

 

Any help would be MASSIVELY appreciated.

 

Thankyou for you're time. :)

Link to comment
Share on other sites

if i remember well, the compiler don't accept this :

 

192 C(1)=C(1)+1::IF C(1)=31 THEN C(1)=1

193 C(2)=C(2)+1::IF C(2)=31 THEN C(2)=1

194 C(3)=C(3)+1::IF C(3)=31 THEN C(3)=1

195 C(4)=C(4)+1::IF C(4)=31 THEN C(4)=1

 

You need to write like this :

 

 

192 C(1)=C(1)+1::IF C(1)=31 THEN 1000

193 C(2)=C(2)+1::IF C(2)=31 THEN 1010

194 C(3)=C(3)+1::IF C(3)=31 THEN 1020

195 C(4)=C(4)+1::IF C(4)=31 THEN 1030

1000 C(1)=1 :: GOTO 193

1010 C(2)=1 :: GOTO 194

1020 C(3)=1 :: GOTO 195

1030 C(4)=1 :: GOTO 196

 

Why not trying Peter Kull compiler ? It accept as-it XB program.

Edited by rocky007
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...