Jump to content
IGNORED

7800basic for Newbies: A Tutorial, Part 2


Atarius Maximus

Recommended Posts

Are you still having trouble displaying the blue portion of that 320B sprite above? You'll notice that the C1 color has conditions on being displayed in 320B, in that it must be paired with either a C2 or C3 pixel in the same pixel-pair, otherwise it doesn't get displayed. (ie: it'll take the background color for itself.)

 

I ran into that issue early in Graze Suit Alpha. Note that prosystem will incorrectly show C1 all the time, but Mame and real hardware will display C1 pixels using the rule above.

 

Also, 320B only uses palettes 0, and 4. Attempts to use palettes 1-3 will default to palette 0, and uses of palette 5-7 will use palette 4. ie: it only looks at the top palette bit in the display lists to determine palette.

 

Mord - thanks for the excellent description of how 320B works. I didn't have a very firm grasp of how it worked when I was working on that demo. I haven't worked on it since sometime last summer so I can't say I'm still having trouble with it... I dug that up just as a sample for Dauber. Either way the info you shared will make it much easier next time, thank you. :)

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

I decided that I'm going to attempt to try learning 7800 Basic again. I'm having to force myself, due to my lack of attention span. I was hoping to use Paint Shop Pro Photo X8, but I cannot for the life of me figure out how to import the palette.(I've used the info previously posted. Methinks I may have to manually create it.) I really didn't want to load GIMP, but it seems to me that since the last time I used it, the interface got much better.

EDIT: Duhh. I just saw a step that I missed on previous reading. I'll try it again tonight.

Edited by Inky
Link to comment
Share on other sites

  • 1 year later...

Hello, I'm trying to use tiled to make a plotmap, I first used the sprite editor in atari dev studio to make an 8x16 tile, then followed this tutorial, but I get these errors

 

User-defined 7800.asm found in current directory

 

--- Unresolved Symbol List

TWOPADDLESUPPORT         0000 ????         (R )

TRAKTIME                 0000 ????         (R )

MOUSEXONLY               0000 ????         (R )

MOUSE0SUPPORT            0000 ????         (R )

testsprite               0000 ????         (R )

MOUSE1SUPPORT            0000 ????         (R )

PADDLESUPPORT            0000 ????         (R )

PADDLERANGE              0000 ????         (R )

PADDLE0SUPPORT           0000 ????         (R )

PADDLE1SUPPORT           0000 ????         (R )

MOUSETIME                0000 ????         (R )

CANARYOFF                0000 ????         (R )

DRIVINGBOOST             0000 ????         (R )

TRAKBALL0SUPPORT         0000 ????         (R )

TRAKBALLSUPPORT          0000 ????         (R )

DEBUGWAITCOLOR           0000 ????         (R )

TRAKBALL1SUPPORT         0000 ????         (R )

CANARRYOFF               0000 ????         (R )

PADDLESCALEX2            0000 ????         (R )

TRAKXONLY                0000 ????         (R )

PADDLESMOOTHINGOFF       0000 ????         (R )

PRECISIONMOUSING         0000 ????         (R )

 

and

 

Fatal assembly error: Source is not resolvable.

 

Cartridge size not a multiple of 4K bytes!

 

 

it has testsprite as unresolved symbol, thats the tile I made in the sprite editor, but it's also the name of the tileset in tiled, and that seems to be what it's refering to, what could be wrong?

And what does the .spe file do?

Link to comment
Share on other sites

I had forgotten to incgraphic.. but now I get this error?

ERROR, plotmapfile didn't find a palette for testsprite

 

 set tv ntsc

 set zoneheight 16

 set tallsprite off

 

 set doublewide on 

 set basepath graphics 

 

 

 displaymode 160A 

 

 incgraphic testsprite.png 160A 1 2 3 0

 incmapfile testmapfile.tmx


 

 ; Set Palette 0 Colors – as I commented, it sets Palette 0.

 

 ;P0C1=$26 ; P0 is for Palette 0, C1 is for Color 1.

 

 ;P0C2=$24

 

 ;P0C3=$04

 

   P0C1 = testsprite_color1

   P0C2 = testsprite_color2

   P0C3 = testsprite_color3

 

 rem ** setup Palette 1

 

 P1C1=$12

 

 P1C2=$F6

 

 P1C3=$Fc



 

 clearscreen 

 

   plotmapfile testmapfile.tmx testmapfile 0 0 20 12

 

 savescreen 

 drawscreen

 

mainloop

 ;BACKGRND=$00 

 

 restorescreen 

 

 drawscreen 

 

 goto mainloop 

Link to comment
Share on other sites

For any tiles that are used in a mapfile, the incgraphic statement for those tiles needs a palette parameter. Otherwise 7800basic doesn't know which tiles in that map should, for example, use the palette set aside for water colors, and which should use the palette set aside for ground colors.

 

See the incgraphic docs for more info.

  • Like 1
Link to comment
Share on other sites

3 hours ago, RevEng said:

For any tiles that are used in a mapfile, the incgraphic statement for those tiles needs a palette parameter. Otherwise 7800basic doesn't know which tiles in that map should, for example, use the palette set aside for water colors, and which should use the palette set aside for ground colors.

 

See the incgraphic docs for more info.

I have read that many times and other threads about the same error, but I'm obviously missing something

incgraphic testsprite.png 160A 1 2 3 0

123 being the different colors and 0 the "palette parameter"?

but rt seems to use 0-2 for colors instead of 1-3? and in other examples it seems like the first number is the palette followed by the colors?

I'm confused.

 

 

Link to comment
Share on other sites

4 minutes ago, Lillapojkenpåön said:

I have read that many times and other threads about the same error, but I'm obviously missing something

incgraphic testsprite.png 160A 1 2 3 0

123 being the different colors and 0 the "palette parameter"?

but rt seems to use 0-2 for colors instead of 1-3? and in other examples it seems like the first number is the palette followed by the colors?

I'm confused.

 

 

Those 4 numbers are all palette entry numbers, specifying what color in the image corresponds to what color entry in the palette. Following those 4 numbers you would add one more number to specify which palette you are using. It looks like you have palettes 0 and 1 defined in your code, so presumably you would put 0 or 1 for that, e.g.:

 

    incgraphic testsprite.png 160A 1 2 3 0 0

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Ok thanks! It compiles now but still just a black screen

 

do you see anything else wrong?

 

Spoiler

 

 set tv ntsc

 set zoneheight 16

 set tallsprite off

 

 set doublewide on 

 set basepath graphics 

 

 

 displaymode 160A 

 

 incgraphic testsprite.png 160A 0 1 2 3 0

 incmapfile testmapfile.tmx

 

 

  P0C1=$26 ; P0 is for Palette 0, C1 is for Color 1.

 

  P0C2=$24

 

  P0C3=$04



 

 clearscreen 

 

   plotmapfile testmapfile.tmx testmapfile 0 0 20 12

 

 savescreen 

 drawscreen

 

mainloop

 BACKGRND=$0E

 

 restorescreen 

 

 drawscreen 

 

 goto mainloop 

 

 

Link to comment
Share on other sites

There is a subtle advantage if you're using a lot of tiles, otherwise not so much. The main benefit is that you can cover twice as much of the screen without doubling the width of your tilemap which in turn reduces the number of objects being drawn to fill the screen, and reduces the amount of time MARIA has to take looking up which tiles to draw.

 

A side effect is that a single unit of 160A graphics is 4 pixels wide, but with doublewide that becomes 8 so taking into account the wider ratio of the pixels that makes it equivalent to a typical 16 pixel tile that's become pretty much standard in games.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

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