Jump to content


Two beginner's questions to batari-basic

6 replies to this topic

#1 Franky666 OFFLINE  


    Combat Commando

  • 4 posts

Posted Thu Apr 4, 2019 12:38 PM



I downloaded batari basic and I made my first game with that. 4K-Rom.


Now I have a few questions to that, where I didn't find answers in the www yet.



1. Stella emulator didn't run my game in developer mode until I did a little tweak. Solution?


My game didn't run properly when I switched the stella emulator to developer mode. The game, written in NTSC-mode, gave "Snow" and was wrongly run in PAL. It especially happened if I turn on the input pin randomizer functions in developer mode.

By trial and error I found out that setting pfrowheight was the cause. I didn't manage to get it work first. But then I found out, that in one of the assembler include files a "#" seems to be missed. I added that and since that the game runs fine.

I found out that solution because the else-path of the affected if-branch had an "#" for that line.


I thing, this hacky way isn't a real solution. How to proper fix this issue without hacking an include files?^^



2. Define score characters  for the values A-F possible?

I modified score_graphics.asm to do that.

I added one blank character for "A", because 6 digits with leading zeros was not the best choice for a game mode selector in the beginning. This increased scoretable by 8 byte.


Can I do it that way?

Beside the score "font", there are org and rorg statements for each cartridge type. 

Do I need to shift the value of these by 8 byte for that? Their addresses look like the end of a cartridge so I have to shift it back by 8 byte to prevent the compiler exceeding the rom limits. Or not?

#2 Trip2018 OFFLINE  


    Star Raider

  • 94 posts
  • Fuzzy boi
  • Location:nebraska

Posted Sun Apr 7, 2019 9:48 AM

1: It seems like the problem is that u used too many cycles not sure how to fix this but the way I fixed it was to alternate instructions into separate frames.

2: I'm not quite sure on this one. I do know it's possible as they can be called to the score and output corrupted graphics.

#3 Franky666 OFFLINE  


    Combat Commando

  • Topic Starter
  • 4 posts

Posted Sun Apr 7, 2019 12:35 PM

That I use too many cycles can't be the case.
It is happening too if I run an empty loop with just drawscreen in it.

#4 Karl G OFFLINE  

Karl G


  • 819 posts

Posted Sun Apr 7, 2019 2:13 PM

Can you post a sample program that demonstrates the problem, maybe?

#5 Franky666 OFFLINE  


    Combat Commando

  • Topic Starter
  • 4 posts

Posted Mon Apr 8, 2019 5:08 AM

 set romsize 2k
 set tv ntsc 
 set optimization speed 
 gosub ps10
 player0x = 20
 player0y = 20
 COLUP0 = $5E
 goto ruck


This one is fine if I run it in Stella regulary.

If I switch Stella to developer mode, the pink color turns green and the "signal is bad" (No idea how to call if an ancient TV set is slighly mistuned so the image start bouncing up and down). Stella also says "PAL" instead of "NTSC".

#6 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,982 posts
  • Controlled Randomness
    Replay Value
  • Location:North Carolina (USA)

Posted Mon Apr 8, 2019 5:16 AM

What happens if you leave out "set optimization speed"?

#7 Franky666 OFFLINE  


    Combat Commando

  • Topic Starter
  • 4 posts

Posted Mon Apr 8, 2019 6:19 AM

Nothing different.


I already tried different ROM sizes and optimization modes.

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users