Jump to content
IGNORED

7800basic beta, the release thread


RevEng

Recommended Posts

 

Does anyone one have screen shots or detailed information on how to install 7800Basic? After a week or so I was able to get Batari Basic working by reading/downloading in the forums. I am new to programming let alone CMD prompts etc. Any information will be helpful. I can at least say that taking apart others Batari Basic programs I was able to make my 1st game. I would like to take a shot at the 7800 as we all know it allows for better graphics and possibilities. Thanks in advance for any help you can provide.

 

For the most part, take the 7800basic zip in the thread and unzip it. if you're on vista or later you can run a batch file "install_win.bat" that should set up the environment variables for you so that you can run 7800bas in any directory. (You'll open up a command/dos window to run the actual program)

 

1. Download the 7800basic zip file in the thread.

2. unzip it somewhere on the harddrive. (I tend to recommend in the root C: directory so you know where to find it)

3. run the "install_win.bat" file that will be the main directory created from the zip.

4. run "command.com" to open up a command window. (Where to do this varies with your OS. It's in the start menu if you have one!)

 

You can use any text editor to write your .bas file. Save it in a directory by itself (along with any files it may need of course!) I recommend this being in the C: directory as well for easy access in the dos window.

 

5. move to the proper directory in the dos/cmd window. When you're in the same directory as your .bas file, you can compile it with "7800bas filename.bas" (where you substitute filename.bas with the name of the program you're trying to compile.)

 

When you start up the command window, it'll likely be in the My Documents directory or something.

 

You can go up/back a directory (towards the C: directory) with "cd .."

You can go down/forward into a directory with "cd <nameofdirectory>"

 

This is why I put my project directories in the C: directory. After I open up a command window I just have to do "cd .." a few times etc.

 

To list the contents of the directory you're in, use "dir"

 

 

No screenshots, but that should help at least. ^^

 

Make sure you use "7800bas" to compile a program, not "7800basic". The latter will start to run but it'll hang and do nothing. If this happens you can press Ctrl-C to cancel it and get back to the dos prompt... I think.

  • Like 3
Link to comment
Share on other sites

I think I finally tracked down the spawn dropping issue I had in Graze. Occasionally the spawn timer would seem to skip 0 as it counted down.

 

To add some randomness to exactly when a mob would spawn next, I would reseed the timer under some conditions with "TimerF = rand&7 + 3". The issue went away (or appears to have gone away!) when I changed it to TimerF = (rand&7) + 3"

 

Took me forever to remember the order of operations was causing it to go:

 

TimerF = rand & 7+3

TimerF = rand & 10

 

Which of course could cause it to evaluate to TimerF = 0, which would make the next frame decrement it to $FF before testing for spawning. :D

 

With the brackets it evaluates to 0-7, then adds 3.

 

Posting here mostly as a cautionary tale for others. ;)

 

 

I did a search and found a few other locations where I did that. :ponder:

  • Like 3
Link to comment
Share on other sites

That actually really comes in handy, so thank you! I was just wondering if 7800basic had a random number generator, and you answered my question.

 

EDIT: And I think we might be having a problem with 7800basic, at least under Windows 10... I just re-downloaded it under Windows 10 (my primary setup is Kubuntu 14.04 LTS 64-bit, a.k.a. Linux) to make some screenshots, to try and help both Lewis2907, and anyone else who might find it slightly daunting to install this excellent piece of software, and found something, when I tried to run both 7800bas.bat, and 7800basic.exe (the second one was just to localize the problem):

 

Running 7800bas.bat by itself just says "The system cannot find the path specified." (I did run install_win.bat first, so it's set up properly), while either adding a command-line argument ("7800bas adventurer.bas" to be exact), or running 7800basic.exe by itself, gives me this:

post-40666-0-15047900-1449033953_thumb.png

 

Is anyone else having any problems with theirs? My Linux setup works just fine (7800basic.sh, 7800basic.Linux.x86, and the like), and as far as I know, I'm using the latest build for it, as well (the one on the first post, as of the date I posted this). Maybe I got a bad download?

 

Just thought I'd throw that out there. If this has already been fixed, or answered earlier in this thread, forgive me.

Edited by MobiusAqua
Link to comment
Share on other sites

Also as a debugging tip if you find your program crashing on you and you just can't seem to see it, doublecheck any recent gosub calls you've made. You know, to make sure you actually used "gosub" instead of apparently implied a goto.

 

For instance I went and typed "if <somecondition> then DestroyEnemy" instead of "if <somecondition> then gosub DestroyEnemy". In the former, it appears to jump to the routine then "return" to garbage information. It appears to compile just fine though which is why this kind of bug sneaks in on me now and then and proceeds to waste a few hours of my life. :)

Link to comment
Share on other sites

  • 2 weeks later...

Missed this edit...

 

EDIT: And I think we might be having a problem with 7800basic, at least under Windows 10... I just re-downloaded it under Windows 10 (my primary setup is Kubuntu 14.04 LTS 64-bit, a.k.a. Linux) to make some screenshots, to try and help both Lewis2907, and anyone else who might find it slightly daunting to install this excellent piece of software, and found something, when I tried to run both 7800bas.bat, and 7800basic.exe (the second one was just to localize the problem):

 

Running 7800bas.bat by itself just says "The system cannot find the path specified." (I did run install_win.bat first, so it's set up properly), while either adding a command-line argument ("7800bas adventurer.bas" to be exact), or running 7800basic.exe by itself, gives me this:

attachicon.gif7800basic Doesn't Start.png

Running 7800bas.bat without an argument does indeed put out that error. I'll look into putting in a test and a sensible error message.

 

I can't replicate any sort of hang while running 7800bas.bat with an argument. Are you certain it wasn't just 7800basic.exe that hung? (which is normal, since it shouldn't be called directly)

Link to comment
Share on other sites

<<HASSAAAAAN CHOOOP!!>>

 

Running 7800bas.bat without an argument does indeed put out that error. I'll look into putting in a test and a sensible error message.

 

I can't replicate any sort of hang while running 7800bas.bat with an argument. Are you certain it wasn't just 7800basic.exe that hung? (which is normal, since it shouldn't be called directly)

 

Well, I booted my primary system into Windows 7 (it has a triple-boot setup, as Windows 7 was what I used, before getting Windows 10 Pro), and tried each of the programs. Just to be sure I didn't get a bad download, I copied my development environment from my Linux hard drive to my Windows hard drive, and tested both. Under Windows 7 they worked perfectly fine. And the strange thing is... I can't replicate the hang anymore, either! :lol: And I don't understand why... I re-booted into Windows 10, after testing things under Windows 7, and now it works. It must have been a false alarm, or something was going on, that was stopping it... my guess is my anti-virus (avast!) was secretly scanning it, and didn't tell me (because that's what it did, the first time I tried opening 7800basic.exe, today), but I could be wrong about that. I don't remember what all I had running, then. Sorry to have bothered you with that. :dunce:

 

Got GIMP setup today (I think) and just successfully compiled a sample program. Getting ready to start reading about the commands.

 

What is recommended for an editor? JEDIT or just use notepad (Windows 7 btw).

 

Thanks for the development of this RevEng!!

 

Forgive me if I'm answering a question that wasn't aimed at me, but you can use any text editor. I would recommend Notepad++, since it lets you open more than one file at a time, and keeps them in tabs. It's freeware, too.

Link to comment
Share on other sites

Thanks for the development of this RevEng!!

My pleasure... glad to see another coder looking into the 7800! :)

 

Regarding the editor, as MobiusAqua said, there's no need for a specific editor. Whatever you fancy.

 

 

Sorry to have bothered you with that. :dunce:

No worries. Better to have a false alert than a missed bug.

Link to comment
Share on other sites

 

 

Forgive me if I'm answering a question that wasn't aimed at me, but you can use any text editor. I would recommend Notepad++, since it lets you open more than one file at a time, and keeps them in tabs. It's freeware, too.

 

Thanks! I like Notepad++ so far. I've started defining my own AT7800 language in it, which is nice. I had hoped for this feature.

Link to comment
Share on other sites

Heads up that I posted a new 7800basic update.

 

-updated 7800header to also serve as a stand-alone tool that can add a header to a bin, or modify an existing a78 header.

-added "spacephysics" sample

-added "mutesfx [pokey|tia]" command

-added alpha (and undocumented) TIA tracker support

-added sample/trackertest program

 

The download link above is to the new 7800 Development Wiki, as mentioned in another thread.

  • Like 4
Link to comment
Share on other sites

Keep up your copy of the docs, RT. I'm still going to follow the same model of including the PDF and pointing to your site... the wiki entry does that now.

 

It's entirely likely I didn't update the guide this time around. I'll add the mutesfx and new tracker info when I get a chance, and ping the thread here.

Link to comment
Share on other sites

Keep up your copy of the docs, RT. I'm still going to follow the same model of including the PDF and pointing to your site... the wiki entry does that now.

 

It's entirely likely I didn't update the guide this time around. I'll add the mutesfx and new tracker info when I get a chance, and ping the thread here.

 

OK, thanks. I always use the My Content link, so I'll see it whenever you post.

Link to comment
Share on other sites

Okiday, this time I'm pretty sure I've found a bug, and I think it might be in a78header.

I downloaded the most recent release of 7800basic, and after making a few edits to my game, compiled it. I was a bit surprised that it encrypted the ROM a bit faster (usually the count hits 08, before it finishes), but when I went to run the ROM in MESS, it didn't boot. All I got was the rolling horizontal bars, like what happens when you start MESS in Atari 7800 mode, without a game cartridge loaded.

Here's the compilation output, just in case:

piccolo@piccolo:~/7800projects/bubblebobble$ 7800basic.sh bb-prealpha_dec19-2015.bas
Using dasm version: DASM 2.20.11 20140304
Starting build of bb-prealpha_dec19-2015.bas
7800basic 0.4 Dec 21 2015 20:32:51
 
*** (): INFO, bank #1, GFX Block #0 starts @ $A000
        digittop alphatop digitbot alphabot rounddigits
*** (): INFO, bank #1, GFX block #0 has 1568 bytes left (98 x 16 bytes)
 
 
*** (): INFO, bank #1, DMA hole #0 starts @ $B000
        no code defined for DMA hole
 
 
*** (): INFO, bank #2, GFX Block #0 starts @ $A000
        digittop alphatop digitbot alphabot rounddigits round001
        round001large round002 round002large round003 round003large
        round004 round004large
*** (): INFO, bank #2, GFX block #0 has 624 bytes left (39 x 16 bytes)
 
 
*** (): INFO, bank #2, DMA hole #0 starts @ $B000
        DMA hole code found and imported
 
 
*** (): INFO, bank #3, GFX Block #0 starts @ $A000
        digittop alphatop digitbot alphabot rounddigits round005
        round005large round006 round006large
*** (): INFO, bank #3, GFX block #0 has 1072 bytes left (67 x 16 bytes)
 
 
*** (): INFO, bank #3, DMA hole #0 starts @ $B000
        no code defined for DMA hole
 
 
*** (): INFO, bank #8, GFX Block #0 starts @ $C000
        bubblunleft01 bubblunleft02 bubblunleft03 bubblunleft04
        bubblunleft05 bubblunleft06 bubblunleft07 bubblunright01
        bubblunright02 bubblunright03 bubblunright04 bubblunright05
        bubblunright06 bubblunright07 bubblunleft11 bubblunleft12
        bubblunright11 bubblunright12 bubblunleft21 bubblunleft22
        bubblunright21 bubblunright22 bubblunleft31 bubblunleft32
        bubblunleft33 bubblunleft34 bubblunright31 bubblunright32
        bubblunright33 bubblunright34 bubblunleft35 bubblunleft36
        bubblunleft37 bubblunleft38 bubblunright35 bubblunright36
        bubblunright37 bubblunright38 bubblunleft41 bubblunleft42
        bubblunleft43 bubblunleft44 bubblunright41 bubblunright42
        bubblunright43 bubblunright44
*** (): INFO, bank #8, GFX block #0 has 1152 bytes left (72 x 16 bytes)
 
 
*** (): INFO, bank #8, DMA hole #0 starts @ $D000
        no code defined for DMA hole
 
*** (): INFO, bank #8, GFX Block #1 starts @ $E000
        bubblegrn0 bubblegrn1 bubblegrn2 bubblegrn3 bubblegrn6 bubblegrn7
        bubblegrn8 bubblegrn9 bubblegrn0a bubblegrn1a bubblegrn2a
        bubblegrn3a zenchanleft1 zenchanleft2 zenchanleft3 zenchanleft4
        zenchanright1 zenchanright2 zenchanright3 zenchanright4
*** (): INFO, bank #8, GFX block #1 has 2816 bytes left (176 x 16 bytes)
 
 
7800basic compilation complete.
User-defined 7800.asm found in current directory
   8047 bytes of ROM space left in the main area of bank 1.
             4096 bytes of ROM space left in DMA hole 0.
   -8147 bytes of ROM space left in the main area of bank 2.
             45 bytes of ROM space left in DMA hole 0.
   6904 bytes of ROM space left in the main area of bank 3.
             4096 bytes of ROM space left in DMA hole 0.
   14460 bytes of ROM space left in the main area of bank 7.
   0 bytes of ROM space left in the main area of bank 8.
             4096 bytes of ROM space left in DMA hole 0.
   pokeysound assembly:  303  bytes
 
Complete.
Read $C000 bytes of cartridge data.
Cartridge hash area is from $F000 to $FFFF.
Cartridge signature for 'bb-prealpha_dec19-2015.bas.bin' appears to be empty.
Encrypting... 00 01 02 success!
 
A valid cartridge signature is:
06 f2 29 c8 19 a8 29 e0  e7 0e 06 3c 9e 6b 53 06
45 56 52 16 f3 03 80 49  42 42 95 0e e8 1e c4 ae
d7 e5 ea 45 31 2e c5 16  4e 76 fe 4c f8 1a 9f bc
c5 79 f3 06 b1 1f 0b 02  41 3c ba ad ae 2b 0c 9f
9e ff 9a bf 2b ae fc 36  b0 80 2d ce 4b 48 64 56
c0 dd e5 1a 77 26 ea 5e  ef cd 3a c8 53 35 69 3e
92 07 23 d3 1d 99 dc 10  6d 88 f8 ba 04 f6 38 d3
15 41 f9 77 48 a8 8b b9
 
Wrote back 120 bytes to 'bb-prealpha_dec19-2015.bas.bin'.
 
7800header 0.4 Dec 21 2015 20:32:55
  opened parameter file a78info.cfg
piccolo@piccolo:~/7800projects/bubblebobble$ 

And here's what's in my project folder's a78info.cfg:

### parameter file for 7800header, created by 7800basic
set tvntsc
set supergame
set pokey@4000

Just for grins and giggles, I tried compiling one of the previous pre-alpha builds of my game (should I even call it that anymore? I think there's quite a few people who know what it is, anyway), which is a 48KB ROM. That compiled the exact same way as the 128KB Supergame ROM did (the December 19th pre-alpha), but MESS actually loaded it, and played it just fine.

So, out of curiosity, I went and downloaded one of Frankodragon's Panda Racer source files (one of the files that compiles into a 512KB ROM), to see what the compiler did, and it did the same thing. MESS wouldn't play it, either.

The reason why I'm guessing it might be a78header, is because my next thought was "what does the compiled ROM look like, in a hex editor?". Popping the 128KB pre-alpha ROM into KDE's hex editor "Okteta", I glanced through the source code, before looking at the A78 header at the top. Here's what the December 19th pre-alpha's header looks like:
post-40666-0-00812100-1451271517_thumb.png
I also threw Panda Racer's ROM into it, as well, and got something similar. Apparently it's setting the cartridge type bits to 2 and 3. Interestingly, I changed the first bit to 0, saved the ROM, and tried loading that into MESS. Started up, no problem.

I'll be happy to post any of my project files, if you need to have a look. Thanks in advance, and sorry if the post is a bit on the long side.

Link to comment
Share on other sites

This one is fixed and updated at the 7800basic page in the wiki. Its also fixed in the Assembly Development Kit there too.

 

When you set any particular header option, 7800header unsets mutually exclusive options. This bug was in the Activision unset code, which was triggered when SuperGame was set.

 

Thanks again for the detailed report, MobiusAqua. :)

  • Like 2
Link to comment
Share on other sites

Now that I got the glitchy fast mobs kicked, I was working on the gradual speedup of mobs as waves progressed in Graze. (it's always been going much faster than intended.)

 

I was trying to increase it slowly, but I noticed it was going up faster than desired in my debug code. After doublechecking the variables weren't referenced elsewhere, and weren't sharing the same ram with other variables, I checked the assembly code which confirms it's loading a larger value for addition. For instance, with the MaximumXS, it was adding 5 instead of 2. For the Ys it was adding 10 instead of 4.

 

No idea how long it's been going on given I had other issues and bugs getting in the way, but this snippet was in the current version, as well as the previous major release (prior to december)

 

(One previous bug I had there was adding 0.2 instead of 0.02. While predictably not what I intended, it was also larger than 0.20 for loading. I it jump from 0.C0 to 0.F3, which is a bigger jump than 0.20!)

 

If it's not a bug, I'm not sure what I'm doing wrong. Pretty sure it's only happening with constants however.

.L01001 ;  if DifficultyLevel  =  NORMAL then MinimumXS  =  MinimumXS  +  0.02  :  MinimumYS  =  MinimumYS  +  0.04  :  MaximumXS  =  MaximumXS  +  0.02  :  MaximumYS  =  MaximumYS  +  0.04  :  goto MW_skipspeedup

	LDA DifficultyLevel
	CMP #NORMAL
     BNE .skipL01001
.condpart103
	LDA MinimumXSf
	CLC 
	ADC #5
	STA MinimumXSf
	LDA MinimumXS
	ADC #0
	STA MinimumXS
	LDA MinimumYSf
	CLC 
	ADC #10
	STA MinimumYSf
	LDA MinimumYS
	ADC #0
	STA MinimumYS
	LDA MaximumXSf
	CLC 
	ADC #5
	STA MaximumXSf
	LDA MaximumXS
	ADC #0
	STA MaximumXS
	LDA MaximumYSf
	CLC 
	ADC #10
	STA MaximumYSf
	LDA MaximumYS
	ADC #0
	STA MaximumYS
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...