Jump to content
IGNORED

7800basic beta, the release thread


RevEng

Recommended Posts

So then, would it be possible to swap out charactersets every display ... first frame has the characters as character set #1 and second frame as character set #2? The purpose of this is to use frame blending so I can get 10 colors in the plotmap. It may be cheating a little bit but I was thinking about experimenting with this anyway.

Edited by Synthpopalooza
Link to comment
Share on other sites

OK, so I tried that ... here's the code and .a78 file. Doesn't seem to be working ... maybe I am missing a step. The dark characters at the top are the ones which should be changing between frames.. Maybe I am missing something crucial ...

 

Also attaching the two pngs representing the two charactersets I am trying to flip. The third block character is the one which should change between frames. It should make a solid dithered color in the center instead of a checkerboard.

 

ramcharmap4.bas

ramcharmap4.bas.a78

post-23798-0-00539000-1502331305.png

post-23798-0-24694100-1502331316.png

Link to comment
Share on other sites

What I usually do is make a "__" as suggested by RT for the labels. I don't know if this would work but you could rewrite as:

if cflip=1 then goto __flipping else goto __doneflip

if cflip<>1 then characterset level1_160A_tileset_b:goto __doneflip

__flipping

cflip=1-cflip
if cflip=1 then characterset level1_160A_tileset_a

goto __doneflip

__doneflip

Link to comment
Share on other sites

You've included those graphics together in the same graphics block. So they're part of the same character set, but use different character indexes.

 

Try putting them both at the beginning of 2 different "newblock" commands, so they're different character sets, and using the same character indexes.

Link to comment
Share on other sites

I don't know if this has been covered before but when using the Tiled editor with plotmapfile, it seems like it is necessary to "embed" the tilesets in Tiled. I've found that if I don't embed them, I always get a compile error that says something like, "plotmapfile cannot find a palette for palette0."

Link to comment
Share on other sites

Hmmm, I haven't had to embed images before, or do anything special. If the graphic names differ between 7800basic and tiled, then it can be a problem; that may not be the direct cause, but in your example error 7800basic does seem to be looking for an image named "palette", which it can't find.

Link to comment
Share on other sites

Hmmm, I haven't had to embed images before, or do anything special. If the graphic names differ between 7800basic and tiled, then it can be a problem; that may not be the direct cause, but in your example error 7800basic does seem to be looking for an image named "palette", which it can't find.

 

Here is an example of the failed compilation message before I embed the images in Tiled and then again immediately after and then it works. The .bas and .A78 files and images are in the attached zip file too.

GhostsnGoblins.zip

post-24017-0-41216200-1503006141.png

post-24017-0-72364800-1503006156_thumb.png

  • Like 1
Link to comment
Share on other sites

Here is an example of the failed compilation message before I embed the images in Tiled and then again immediately after and then it works. The .bas and .A78 files and images are in the attached zip file too.

I recreated your map from scratch, and didn't need to embed. I'm thinking this might be an issue with a differing Tiled version. I'm using Tiled 0.14.2. What's your version?

 

Either way, great that there's a work-around.

Link to comment
Share on other sites

So, another question about character flipping:

 

I've decided that I want to have a second palette, which will be palette 4, (of palettes 0 through 7) ... I want to use the Tiled editor method, but keep the character flip ... if I put both incgraphics for each palette in the same graphics block, at the same place, and have the other frame in the following block, will the character flip method still work? I am not going to use any more than those 2 palettes for character blocks as I don't want to stretch the DMA any more than I have to.

 

Second question: I want to use multiple graphics, changing the structure block design for each level. Is there anyway to use charset to dynamically reference a character set by its actual memory location instead of by it's name? That way I can increment it by each level if I choose. And also will my characterflip method still work in this case?

Link to comment
Share on other sites

I've decided that I want to have a second palette, which will be palette 4, (of palettes 0 through 7) ... I want to use the Tiled editor method, but keep the character flip ... if I put both incgraphics for each palette in the same graphics block, at the same place, and have the other frame in the following block, will the character flip method still work? I am not going to use any more than those 2 palettes for character blocks as I don't want to stretch the DMA any more than I have to.

Yes, the method will work the same with tiled map files.

 

 

Second question: I want to use multiple graphics, changing the structure block design for each level. Is there anyway to use charset to dynamically reference a character set by its actual memory location instead of by it's name? That way I can increment it by each level if I choose. And also will my characterflip method still work in this case?

In theory, sure, but it's pretty much under the hood work, and since graphics can easily shift around when you add more, I wouldn't recommend it. If you look at the assembly code generated from the "characterset" command, you can likely figure a method that works for your application.

Link to comment
Share on other sites

While experimenting with plotmapfile, I've noticed that if I make a large enough graphic, like for a title screen, and portions of the graphics data goes into GFX Block #1, that those parts aren't displayed at all, and only the ones in GFX Block #0 get displayed (both as they were supposed to and also as a substitute for the others).

I've tried this several times with the same result, both in 160A and 320B modes. I don't know if it is a limitation of the plotmapfile command, the 7800 itself (don't think so), or the way Tiled encodes the data in XML or what.

Any ideas anyone?

post-24017-0-71093300-1503882070_thumb.png

post-24017-0-93284200-1503882111.png

shantae.zip

Link to comment
Share on other sites

You're importing graphics to the point you're exceeding 256 characters, and since character indexes are from 0-255, the graphics past the 256th character can't be displayed. I guess you could say this is a 7800 limitation, but it's more like a limitation of most (all?) machines of this era.

 

The incbanner command can be used to import a tall png image, which you can plot with plotbanner. These commands use large sprites, rather than characters, to avoid this very problem.

Link to comment
Share on other sites

OK, needing help ...

 

My latest Sky Scraper demo is in this thread here:

 

http://atariage.com/forums/topic/223121-work-in-progress-sky-scraper-2115/?p=3836032

 

 

I have the first 27 levels in, but I am running out of ROM space, so I am having to look into bankswitching. Right now, I want to try 128K ... How would I go about placing my 27 existing levels in the extra banks, and calling them into the program as needed? I have a total of 39 levels that I ultimately want to include.

Link to comment
Share on other sites

You're importing graphics to the point you're exceeding 256 characters, and since character indexes are from 0-255, the graphics past the 256th character can't be displayed. I guess you could say this is a 7800 limitation, but it's more like a limitation of most (all?) machines of this era.

 

The incbanner command can be used to import a tall png image, which you can plot with plotbanner. These commands use large sprites, rather than characters, to avoid this very problem.

 

Thanks. I thought it might have something to do with that. I had also noticed this when using a single, 16-pixel tall .png file that was longer than 256 8-pixel blocks that I might be running into that problem. I didn't know if splitting it up into multiple .png files would help or not, but obviously it doesn't.

I've only tried plotbanner once or twice. Thanks for the info.

  • Like 1
Link to comment
Share on other sites

I have the first 27 levels in, but I am running out of ROM space, so I am having to look into bankswitching. Right now, I want to try 128K ... How would I go about placing my 27 existing levels in the extra banks, and calling them into the program as needed? I have a total of 39 levels that I ultimately want to include.

Each game is structured differently, according to it's needs, so I can only give a few principles to keep in mind.

 

The last bank is the one that stays in place permanently, while the others banks disappear whenever you goto/gosub to another bank. So any graphics or routines that need be available all the time should go in the last bank. Similarly, data statements in non-permanent banks should be used in the same bank they're in.

 

If you use 144k, the first bank will also be permanent, but this precludes you from using POKEY@4k or RAM@4k, which may or may not be a concern.

 

If you use graphics in a non-permanent bank, you'll need to ensure that bank is active while the screen is drawn (see drawwait) which usually winds up wasting a lot of otherwise useful cycles. There's nothing to be done about this.

 

Hopefully some of that helps.

Link to comment
Share on other sites

Additionally if you're not in need of additional graphics but just need the space for level data and code, you can just make sure the graphics in each non-permanent bank is identical. At that point you can switch between the banks freely without corrupting the graphics being drawn.

 

Another potential trick, if you're going to go with ram at 4k, is to try to compress the level data in the rom. Then when the level is loaded, you decompress the data and put it into the ram area.

  • Like 1
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...