Jump to content
IGNORED

7800basic beta, the release thread


RevEng

Recommended Posts

OK ... another one for you ...

 

I have an assembly language routine for doing music ... Pac-Man-Plus used this in his Bentley Bear game which I did the music for, and I want to repurpose it for my game. I am attaching the .asm listing (the music routines begin at line 306).

 

How would I go about including this into my program? Ideally, I want to be able to call up and play at will any tune or sound which is contained in this .asm file.

 

By the way the music here is the Mario Bros. theme. I'm going to change it for my game of course. ;)

mario-title.asm

Link to comment
Share on other sites

Because 7800basic can find a POKEY at $450 or $4000, you use an indirect pointer to access POKEY. Also, to avoid name conflicts with TIA, the POKEY registers all have a "P" in front of them. Here's the 7800basic example of setting AUDCTL to $50...

 

pokeybase[[PAUDCTL]]=$50

Link to comment
Share on other sites

I decided to give this a try. There's a certain arcade game that I've wanted to see on a home console, and I am going to attempt to do it. I just hope I don't lose interest like I do everything else I attempt.

  • Like 2
Link to comment
Share on other sites

I fell into that trap when I wanted to decrement the brightness in my colours by saying P0C1=P0C1-1. I couldn't figure it out at the time as Prosystem allowed it but MAME correctly did not.

In the end I now have a small section of RAM to hold the colours I want and a subroutine to set them. It means I can do all sorts of mathematical functions on them if I wanted to.

  • Like 1
Link to comment
Share on other sites

OK, frustration ... I am hitting my head against a wall, rather like my poor rocketman in this example:

 

post-23798-0-75380600-1501729963.png

 

He is supposed to hover at the top of the screen however, instead he triggers a fall and doesn't hover.

 

If he is standing on a different platform, like here, it works properly:

 

post-23798-0-79209900-1501730049.png

 

When he is at the very top, he also hovers without problem:

 

post-23798-0-01496600-1501730548.png

 

I am literally at my wit's end as to what to do about this. I am attaching the code ... for some reason, when he stands on the 4th row of a level, it causes this behavior.

 

Attaching binary, .a78, and .bas file ... it also seems the color cycling is not working on real hardware. The blocks should be cycling colors. Any ideas?

ramcharmap3g(7).bas.bin

ramcharmap3g(7).bas.a78

ramcharmap3g(7).bas

Link to comment
Share on other sites

Actually, I seem to have solved that problem ... nevermind. :)

 

But I am wondering, how can I detect blocks when he is hovering at the top, like this:

 

post-23798-0-85453100-1501732043.png

 

What I want to happen is, when he is hovering and he hits the blocks that are at the top, for it to register as a hit and he begins falling ... plus the block changes color if it needs changing, or it triggers a player death if it is a trap at the top. Basically, as though he had flown and hit it from below.

 

Attaching the new code and binaries:

 

 

ramcharmap3g(7).bas

ramcharmap3g(7).bas.a78

ramcharmap3g(7).bas.bin

Link to comment
Share on other sites

But I am wondering, how can I detect blocks when he is hovering at the top, like this:

It sounds like you want an extra coordinate character check, but only when the rocketman has a very small y. (near the top of the screen) The same sort of coordinate you're doing when you're looking for a character underneath the player, but instead offset to the left or right top corner of the rocketman sprite.

Link to comment
Share on other sites

So anyway ... I tried to import a 160A tileset into my game ... the one below:

 

post-23798-0-87992200-1502157155.png

 

And I modified my code to account for this ... this is what I am coming up with:

 

post-23798-0-12522600-1502157227_thumb.png

 

The Graphics are wrong, and they are in the wrong display mode (still 160B). I am attaching my program listing, can you tell me what I am doing wrong?

 

ramcharmap4.bas

Link to comment
Share on other sites

Try using "characterset level1_160A_tileset" before the plotmap command. The plot commands takes on whatever mode the declared characterset is. Bear in mind that using "plotmap" instead of "plotmapfile", it means all of your characters in the whole map will use the same palette.

 

There should be only minimal changes if you go from 160A single-wide to 160B double-wide. The character index values you peek and poke will be half of what the old 160B values will be.

Link to comment
Share on other sites

OK, some progress:

 

post-23798-0-88279300-1502160921_thumb.png

 

Problems now are:

 

Color cycling is still not working properly. The first 2 color registers P0C1 and P0C2 cycle, but P0C3 does not.

(EDIT: Nevermind, fixed it!)

 

Scoring display is now messed up ... I am sure it involves doublewide mode somehow, but not sure how to fix it.

 

Also: Missile and Player now show up on the same line. One question: How would I go about doing a pokechar to the screen but have the block show up in a different palette?

ramcharmap4.bas

ramcharmap4.bas.bin

ramcharmap4.bas.a78

Edited by Synthpopalooza
Link to comment
Share on other sites

looks like you turned doublewide off since the previous version. This makes it grab half as much data per character, and likely alters where it's grabbing the data from.

 

If you need doublewide turned off for the rest of the sprites, then I guess you'd have to re-think the offsets in the font used for your menu. (At the very least the string you get it to write would require twice as many character references, and the references would be different from when doublewide was on. "A" wouldn't be "A" anymore in the string so to speak.)

Edited by Mord
Link to comment
Share on other sites

One question: How would I go about doing a pokechar to the screen but have the block show up in a different palette?

You can't change the palette via pokechar. This only changes the character index at a location, and Maria doesn't change palettes based on the character index. Maria determines the color palette by the display list object, and in this case the display list object is a wide group of characters. This is what I was going on about earlier.

 

Think of each plotmap command as a stamp, and you can only dip it in one inkpad (palette) for each screen area. Right now you have 2 stamps, covering the left and right halves of the screen. If you want more palettes, you need to break up your 2 stamps into different combinations of smaller stamps... per level.

 

This would be tedious, so I was recommending using tiled and plotmapfile for your level design. plotmapfile will break up your map file into different stamps all on it's own. You still won't be able to practically change a character's palette on the fly, but at least your level designs will be able to have 1 palette per block type.

 

Or you could try the other solution to your DMA problem, keeping the 160B tiles and trimming the plotmap width by 2 or 4 characters.

Link to comment
Share on other sites

What if I were to use a pokechar of 0 at the character location followed by a plotchar command of the character in the palette that I want?

 

I think ultimately I will end up using plotmapfile ... I still need a way of changing the colors of the blocks on the fly though and I wondered if plotchar would do the trick. Maybe have the changed blocks from a different incgraphics block and use the charset command.

Edited by Synthpopalooza
Link to comment
Share on other sites

The other question is the scoring display. I had wondered if using the topscreen routine to set the top row to 160B in double wide would fix this problem? Or using the extrawide function in alphadata?

 

Unfortunately the doublewide parameter is set at compile time with the setdoublewide command and can't be changed - it physically changes some of the commands of 7800Basic that get baked into the rom for determining offset locations. So it'll be always on for everything, or always off for everything.

Link to comment
Share on other sites

Your choices here are to either plot on top of existing characters, or redraw the screen. The former will cause you to run out of DMA if there's a lot of changes in a zone, the latter will cause a lag during block changes (if double buffering is used) or be visible and lag (if regular drawscreen is used)

 

If you change the characterset, all the graphics will change in one instant.

 

As mord says, the doublewide parameter is baked in. If you don't use doublewide, you can simulate it with some plot functions that have the extrawide parameter.

Link to comment
Share on other sites

So this means that issuing a characterset command will affect the characters already in the plotmap?

 

Correct. Maria only knows of one characterset at any one time. The only exception would be changing the characterset during the visible screen display, at which point one set of characters would be used above the change, and another set of characters would be used below the change.

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