Jump to content
IGNORED

TwentySixHundreds 7800 thread


Recommended Posts

Ok to start with i'm probably going to ask some silly questions that probably seam clear as day. I have had a quick look into the 7800 realm using mksmith's ADS and wrote a very small test program. My biggest hurdle is feeling like a fish out of water with the graphical side of things. The syntax looks to be very much like batari basic when it comes to the logic instructions side of things.

 

Basically i have got as far as some flashing background colours however it doesn't display many. Mainly just some shades of greys and reds, im assuming my code is only talking to the luminosity side of things. As far as what i'm reading with the 7800 guide on RT's site i need to import PNG's to the program for backgrounds and Sprites? Im struggling to get my head around how this exactly works.

 

Something like i create a GFX folder within the directory where my .bas file is then use include to import that image to the program? I have quickly worked out adding sprite data as one does in batari throws compile errors. This leaves me to think all the graphical data MARIA handles is tiles?

 

Once again i know i'm probably asking silly questions it's just im trying to understand this foreign concept.

  • Like 1
Link to comment
Share on other sites

Hi SmittyB thanks for the reply, yeah so thought i would make a very small test program basically to player around with the background colours and place a sprite on the screen.

 

So this compiles and displays a handful of colours then loops. I was more expecting it to display a rainbow effect rather then a few shades of greys and reds. Anyway it kinda worked

 set romsize 32k
 displaymode 320A

MAIN

 a = a + 1
 if a > 30 then a = 0 : b = b + 1
 BACKGRND = b

 drawscreen
  goto MAIN

 

Then i moved onto this where it threw the compile error quickly leading me to believe standard data sprites are not supported like the 2600.

 set romsize 32k
 displaymode 320A

 player0x = 80
 player0y = 80

 player0colors:
 $c4
 $c4
 $c4
 $c4
 $c4
 $c4
 $c4
 $c4
end

 player0:
 $c4
 $c4
 $c4
 $c4
 $c4
 $c4
 $c4
 $c4
end

MAIN

 a = a + 1
 if a > 30 then a = 0 : b = b + 1
 BACKGRND = b

 drawscreen
  goto MAIN

After having a glance over the 7800 guide on RT's site i couldn't find much about player sprites like the 2600 but rather tiles and PNG images. So im assuming it's similar to the Nintendo in that regard and the sprites are made up of 4x4 tiles. After reading further more i got a bit lost as to how i include them to the ROM/Code. Maybe i need to go have a good read of the guide rather then trying to jump straight in.

Link to comment
Share on other sites

Yeah, the graphics are different - the 2600 has a limited number of hardware sprites, but the 7800 has a sort of hardware-assisted software-sprite implementation where the number of sprites isn't some fixed number. What that means from the basic programmer's perspective, is you can draw as many sprites as you have CPU time to do, within a given frame. (with certain exceptions that aren't really important to you yet) So things like "player0" "player1", etc., didn't make sense for 7800basic. Plus, defining multi-color graphics in ascii text is a mess.

 

Have a look at the provided "samples" directory, specifically the simple.bas example. Then play around modifying it. I think you'll find that's a good start.

  • Thanks 1
Link to comment
Share on other sites

4 minutes ago, RevEng said:

Yeah, the graphics are different - the 2600 has a limited number of hardware sprites, but the 7800 has a sort of hardware-assisted software sprite implementation where the number of sprites isn't some fixed number. What that means from the basic programmer's perspective, is you can draw as many sprites as you have CPU time to do, within a given frame. (with certain exceptions that aren't really important to you yet) So things like "player0" "player1", etc., didn't make sense for 7800basic.

 

Have a look at the provided "samples" directory, specifically the simple.bas example. Then play around modifying it. I think you'll find that's a good start.

Ah that makes sense, think im stuck in my old ways with bB. All good yeah i think i downloaded the sample.bas about 12 months ago when checking out 7800basic before mksmith created ADS. I'll be able to have a better look later today when home, thanks for clearing that up.

  • Like 1
Link to comment
Share on other sites

I have found a PDF of the 7800 devkit i will have a read through to get an understanding about the 7800's PPU. Probably should have done this before jumping in the deep end. Don't know why i didn't think about it before, as when i started with the 2600 i read the Stella handbook through a couple of times. Even though it's assembler ill probably get more of an idea about how the hardware works. All good

  • Like 2
Link to comment
Share on other sites

Ok so an update as to where im at i have played around using the simple example test code. My goal was to alter and get an understanding of how the graphics side of things works. So it's becoming clearer and i have managed to add another sprite while having the background colour alternate between two colours. They also bounce around by themselves and for testing purposes i haven't worried about using bit operations.

 

One problem i have encountered is when trying to edit the new sprite in paint.NET the compiler threw an error saying "too many colours used" i hadn't even changed the colours though. Anyway some progress none-the-less so i'm fairly happy with that.

 

test game.bas

test game.bas.bin

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...