Jump to content
IGNORED

7800 Cartridge and 7800 Basic Issues


Lavalamp

Recommended Posts

7800Basic nub here.

 

I'm enjoying 7800Basic, but there are some quirks I'm not sure about, I often get a BIN size errors that seem to be caused by syntax or logic errors, but it gives me no clue to where the issue is (line number etc). Is this standard behavior? Because its very time consuming to find these sometimes.

 

My second issue is when I complete my homebrew I would like to produce a cartridge for it, whats the best way to go about this? I've have read cannibalising a real 7800 cartridge is an option, but cant I print a PCB and use a 3D printer to print the case?

Link to comment
Share on other sites

If you typo a command name, or something along those lines, you should get an error with line number. Here's the output for an error on line 62: "*** (62): ERROR, unknown keyword 'foobar'."

 

If you typo a variable or label, it will give you a list of "Unresolved Symbols". This is inherited from the assembler 7800basic uses to generate the ROM. When you see that unresolved symbol list, it should say what variable/label you've mistyped, though there may be a bit of extra stuff in that list you need to ignore.

 

If there's a typo that doesn't cause an error in one of the above styles, it would likely be a bug, and should be reported.

 

It's not a perfect system, but once you get comfortable with it, it shouldn't take you too long to track down typo bugs.

  • Like 1
Link to comment
Share on other sites

I think the main issue with using a 3d printed case is that it'll be weaker than a standard cartridge shell. Probably not the best option for final products.

 

Regarding errors, I agree that sometimes it can be a pain to find the actual problem. Best advice is to just remember what caused the error once you finally fix it. That way when you see that particular error again you have a better idea of where to start.

 

With the unresolved symbols list error Rev points out above, most of the symbols will likely be 7800basic defined variables. So keep a close eye on anything you defined yourself. Also make sure you don't try to define anything already defined by 7800basic accidentally. (temp1 for instance I believe.)

 

OH, also when looking for reported bugs it's often a good idea to look before the line numbers 7800basic will throw at you. Sometimes the actual bug happens up above that, and the line 7800basic is screaming about is just the line where it finally said "THAT'S IT! I QUIT!" Half of these types of errors, for me, is just as much about something I didn't type as it is something I did type.

  • Like 2
Link to comment
Share on other sites

7800Basic nub here.

 

I'm enjoying 7800Basic, but there are some quirks I'm not sure about, I often get a BIN size errors that seem to be caused by syntax or logic errors, but it gives me no clue to where the issue is (line number etc). Is this standard behavior? Because its very time consuming to find these sometimes.

 

My second issue is when I complete my homebrew I would like to produce a cartridge for it, whats the best way to go about this? I've have read cannibalising a real 7800 cartridge is an option, but cant I print a PCB and use a 3D printer to print the case?

 

I thought this might be helpful for common errors when you're first getting started, it's pulled from part 1 of my 7800 basic for newbies thread.

 

Common Compile Errors

This is not an exhaustive list, but here are a few errors you might see when compiling your code, and what you can do to resolve them. In many cases the error itself will tell you specifically what the problem is. I figured I'd be revising this list and adding to it as time goes on.

The system cannot find the path specified.

It’s likely you are running the 7800bas.bat file by itself with no code specified after it. Run “7800bas mycode.bas” instead.

7800basic 0.6 Jul 12 2017 22:46:35, then it hangs

If you only see a message similar to the above that shows the version of 7800basic you’re using, you’re probably running 7800basic.exe instead of 7800bas.bat. 7800basic.exe is not intended to be run for compiling, you need to use the batch file.

*** (101): ERROR, graphics overrun in bank 1

The error message means you have too many graphics with "incraphic" in bank1. You'll need to shift some of those to another bank. Keep in mind that when you issue "drawscreen" you can only use graphics in the last bank or the same bank with the "drawscreen" command.

*** (1667): error: Label mismatch...

Unrecoverable error(s) in pass, aborting assembly!

There can be a few causes for "label mismatch". General syntax errors or duplicate labels are the common causes. An bank that’s over filled might trigger the error as well.

I generated the error above by creating an "if...then" statement and leaving off the "then", an easy syntax error to make.

If you can't figure out where the error is, the (1667) refers to the line number in the asm output file. You can open the asm file and look at line 1667 to see what exactly is causing the error.

*** (144): ERROR, alphadata character ' ' is missing from alphachars."

You defined an alphachars image file that doesn’t contain the character specified in the command. The "144" means the syntax error occurred on line 144.

*** (1698): error: Value in 'cmp #257' must be <$100

Somewhere in your code you've called an invalid number.

Unresolved symbol List Errors

--- Unresolved Symbol List ---

USED_ADJUSTVISIBLE 0000 ???? (R )

ROMAT4K 0000 ???? (R )

0.dsdfff 0000 ???? (R )

The "Unresolved Sybol List" error will give you some clues as to where to look. In this case, I created an invalid goto statment to a non existent label, "dsdfff". Look for items in the list that you recognize that you’ve created yourself – variable names, label names, etc. That’s where to look first.

  • Like 4
Link to comment
Share on other sites

Thanks guys, I do have one perplexing issue, Ill try to get to the bottom of it and post what I find, after copying all my code to a test file and removing blocks of code out one by one, discovered doesn't like the line highlighted with <<<..

rem Invaders
set doublewide on
set basepath gfx_invaders
set romsize 48k
set hssupport $7272 : rem temp UID for Game.
displaymode 160B

dim frameCount   = var1
dim invaderX     = a.b
dim invaderY     = var2
dim invaderFrame = var3
dim invaderCount = var4
dim invaderMove  = c.d
dim playerX      = e.f
dim playerY      = var5
dim playerShotX  = var6
dim playerShotY  = k.l
dim playerFired  = var7
dim playerSpeed  = var8
dim moveX        = g.h
dim tempX        = i.j
dim ufo          = var9
dim ufoX         = m.n
dim ufoSpeed     = o.p
dim ufoFrame     = var10
dim ufoShotX     = q.r
dim ufoShotY     = s.t
dim ufoFired     = Var11
dim midX         = var12
dim midY         = var13

const true       = 1
const false      = 0
const screenH    = 192
const screenW    = 160

P0C1=$02: P0C2=$06: P0C3=$0F

incgraphic player.png
incgraphic player_shot.png
incgraphic space_invader1.png
incgraphic space_invader2.png
incgraphic ufo1.png
incgraphic ufo2.png
incgraphic ufo3.png
incgraphic ufo_shot.png
incbanner paused.png

maininit
clearscreen
midX         = screenW / 2
midY         = screenH / 2
playerSpeed  = 0.1
playerX      = midX - 8
playerY      = screenH - 16
invaderX     = 0.0
invaderY     = 16
invaderMove  = 0.2
invaderFrame = 0
frameCount   = 0
moveX        = 0.0
invaderCount = 4
playerFired  = false
ufo          = false
ufoSpeed     = 0.6
ufoFrame     = 0
ufoFired     = false <<<
ufoShotX     = 0.0
ufoShotY     = 0.0
savescreen
drawscreen
...

Edited by Lavalamp
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...