Jump to content
IGNORED

New build: Improved if-then


batari

Recommended Posts

Both the default.bas and the file jwierer sent to me build just fine. The extraneous end is a warning, not an error, and it's correct.

 

The problem with both does seem to be data statements. The errors: (13): Error: Unknown keyword: B and this error: (595): Error: Unknown keyword: 2☺ are both right after data statements.

 

I looked at the code and there is some uninitialized memory during data statements, and I didn't think the memory was used, but just in case I have cleared it all before use. Let me know if this fixes those weird errors.

 

Also, this build fixes some variables that previously conflicted with keywords (like "foreground") and improves keyword detection overall. This version also spots a previously undetected error in the file jwierer sent to me (and I expect this to happen again, but these are truly errors anyway.)

Yes, whatever you did fixed the problem. Thank you.

Edited by jbs30000
Link to comment
Share on other sites

Thanks this found the bank sytanx error in the code I sent you and now it compiles fine. I can still periodically crash 2600basic.exe though. If I take the same code I sent you and repeatedly call 2600bas <codename> at the commandline, eventually the compiler will crash. I am guessing it's a timing issue where one of the executables has not released a file lock and in the subsequent compile 2600basic.exe crashes (just a guess).

 

-Jeff

 

 

Link to comment
Share on other sites

Edit:

There seems to be a problem with spacing. For instance, sometimes I'd get an error when trying to build my program, so I put a return in-between two lines, for instance

 

Line 1

Line 2

Fails

 

Line 1

 

Line 2

Works

 

But then for one problem, I simply deleted returns after labels

 

Label

Line 1

Fails

 

Label Line 1

Works

 

So anyway, I deleted a bunch of code and now I can't build my program any more. So I'm back to the older 2600Basic.exe.

 

My program has set romsize 32kSC and has a ton of code, so those might be contributing factors. People making small programs may not run into this issue.

Edited by jbs30000
Link to comment
Share on other sites

  • 3 weeks later...

Speaking of updating bB, are any of these things included:

 

http://www.atariage.com/forums/topic/122024-64k-bb-games/page__view__findpost__p__1483436

Superbanking supports 256k (I worked on this scheme a few months ago and built a prototype.) The next version of Stella should support it, as will bB (eventually.) I came up with this scheme so I'd have enough space for a game that I hope to finish someday.
There have been a lot of bugfixes and optimizations (e.g. in some cases, games may recover a few hundred bytes) and a couple of new commands added to the compiler.

 

I've started on scrolling in the multisprite kernel, and it's "sort of" working, and I have what I'm calling "vectors" working in the standard kernel, but need to add compiler support for them. By "vector," I mean you are able to turn a missile into a line or an arc connecting two points, for example like the Pitfall vines. Or you can also use a missile as a "fake player" by varying the width, or you can shift a player object per line to make it look more interesting, like the cows in Stampede or the dolphin in Dolphin. The only drawback to this is the HMOVE "comb" at the left edge of the screen, but there seems to be no way around that.

 

 

I especially love this stuff:

 

I have what I'm calling "vectors" working in the standard kernel, but need to add compiler support for them. By "vector," I mean you are able to turn a missile into a line or an arc connecting two points, for example like the Pitfall vines. Or you can also use a missile as a "fake player" by varying the width, or you can shift a player object per line to make it look more interesting, like the cows in Stampede or the dolphin in Dolphin.

 

 

And I'm always hopeful that automatic handling of 4-bit nybble variables will be added so people won't get confused and lost with all of the calculations:

 

http://www.atariage.com/forums/topic/133045-feature-requests-for-batari-basic/page__p__1610607#entry1610607

 

Sometimes you need more than a single bit, but you don't need the variable to hold more than 15.

 

 

 

Oops, almost forgot about this one:

 

We have on and off with the playfield, but what about "no action"

Edited by Random Terrain
Link to comment
Share on other sites

  • 1 month later...

Part of the motivation to improve if-then statements was from this thread where some tried various suggestions to find something that would build properly in bB and nothing worked.

Any chance I can get a linux x86 binary, or failing that, the source?

 

You try WINE with wine-doors or WineTools yet? I could see someone cooking up a Puppy Linux Live CD with WINE, bB and Visual bB.

Edited by theloon
Link to comment
Share on other sites

You try WINE with wine-doors or WineTools yet? I could see someone cooking up a Puppy Linux Live CD with WINE, bB and Visual bB.

No go with wine... I'm not entirely sure if wine works well with apps that redirect stdout/stdin, but in any case it errors out.

 

The stock Linux compile at batari's website works great, but a lot of times when I'm trying to help someone out they have code that relies on the newer version.

Link to comment
Share on other sites

  • 1 month later...

I'm using the latest version posted here:

 

http://www.atariage.com/forums/topic/168036-new-build-improved-if-then/page__view__findpost__p__2081991

 

 

When I made a simple test program using "const pfres=24" I got this error:

 

--- Unresolved Symbol List
kernelmacrodef           0000 ????         (R )
pfwidth                  0000 ????         (R )

 

 

Here is the test code:

 

  set romsize 16kSC

  const pfres=24

  playfield:
  X..............XX..............X
  X....X.XX......................X
  X...............XXXXXX.X..X.....
  X..............................X
  X..............................X
  X..............................X
  X..............................X
  XXX.XX.X.......XXXXXXXXXXXXXXX..
  X..............................X
  X..............................X
  X...........X...XXXX...........X
  ...............................X
  ...............................X
  X...............................
  ...............................X
  X....................XX.XXXX...X
  X..............................X
  X......X...XX..................X
  X....XX.XXXX.X......XX.........X
  X..............................X
  X..............................X
  X..............................X
  X..............................X
  X.........X.X.XX.X...XX........X
end

Main_Loop

  COLUPF = $CE : COLUBK = $80

  drawscreen

  goto Main_Loop


  bank 2

  bank 3

  bank 4

Link to comment
Share on other sites

I'm using the latest version posted here:

 

http://www.atariage....ost__p__2081991

 

 

When I made a simple test program using "const pfres=24" I got this error:

 

--- Unresolved Symbol List
kernelmacrodef       	0000 ????     	(R )
pfwidth                  0000 ????     	(R )

You need to set a constant named pfwidth, like this:

 

  const pfwidth=4

I don't know why, but pfwidth suddenly showed up in that build. As far as I know, it should be set to 4.

 

Michael

Link to comment
Share on other sites

You need to set a constant named pfwidth, like this:

 

  const pfwidth=4

I don't know why, but pfwidth suddenly showed up in that build. As far as I know, it should be set to 4.

Thanks. It works! Seems kind of useless. I wonder why it was added?

 

Edit:

Forget about my wondering. I saw what you said in the other thread:

 

http://www.atariage.com/forums/topic/173552-superchip-memory-map/page__view__findpost__p__2153807

Edited by Random Terrain
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...