Jump to content
IGNORED

Peekchar & tiled with multiple tilesets


Recommended Posts

10 minutes ago, RevEng said:

The 7800 has locations of ROM that graphics need to go into, so they display properly. Each time you do an "incgraphic mygraphic.png" it will import graphics into the current graphics block, until it's full, and then it moves on to the next. If you check the compile messages, you'll see stuff like...

 


*** (): INFO, GFX Block #1 starts @ $A000
        mysprite1 mysprite2 playfield_tiles
        [...]

In the above example, the first "playfield_tiles" character won't be character index "0", because there are other graphics that proceed it in it's graphics block. To force it to be at position 0, you'd reorder things so playfield_tiles comes first. (and if there are other incgraphic statements prior, you might need a "newblock" before the incgraphic for the tiles.)

 

Aside from looking at that, I think you need to temporarily disable the falling code, and just add some temp code allow your player to be moved all around the screen by joystick. See if the values change where they should, and what they change to.

Thanks, so now the graphics locations makes more sense. Yeah i am seeing the tallsprites in block 1 and obviously the tilesets are in bank 32 because that's an persistent bank? Im guessing that could be causing issues?

*** (): INFO, bank #1, GFX Block #0 starts @ $A000
        playerstand playerstand_tallsprite_00 playerstandr
        playerstandr_tallsprite_00 playerwalk1
        playerwalk1_tallsprite_00 playerwalk2
        playerwalk2_tallsprite_00 playerwalk3
        playerwalk3_tallsprite_00 playerwalk1r
        playerwalk1r_tallsprite_00 playerwalk2r
        playerwalk2r_tallsprite_00 playerwalk3r
        playerwalk3r_tallsprite_00
*** (): INFO, bank #1, GFX block #0 has 3072 bytes left (192 x 16 bytes)


*** (): INFO, bank #1, DMA hole #0 starts @ $B000
        no code defined for DMA hole

*** (749): WARNING, image contains more unique colors than 160A allows

*** (): INFO, bank #32, GFX Block #0 starts @ $C000
        tileset_blanks tileset_grassy tileset_lake tileset_fort
        scoredigits_8_wide alphabet_8_wide
*** (): INFO, bank #32, GFX block #0 has 0 bytes left (0 x 16 bytes)

 

2 minutes ago, RevEng said:

The value returned isn't BCD format, so if plotvalue displays "64", it's actually "$64".

To be honest i think im plotting the value wrong, i tried to display one of the temps and it's just a static value. Im not having a good run at the moment ?

Link to comment
Share on other sites

24 minutes ago, RevEng said:

Aside from looking at that, I think you need to temporarily disable the falling code, and just add some temp code allow your player to be moved all around the screen by joystick. See if the values change where they should, and what they change to.

I think you're right, i should probably create a test program rather then testing within the engine i have. There could be something else causing an issue within the engine im using and im completely overlooking it. I will have a go tomorrow with a program that has nothing other then a couple of sprites and some tiles to simplify things a little.

 

Usually i create test programs for anything new i learn, however this time i think i jumped the gun ?

  • Like 1
Link to comment
Share on other sites

No worries. I'm glad to leave it in your hands, and I'm glad to continue working things out too. Whatever it takes.

 

Your character graphics are starting within the graphics block (unlike my example) so they should come back with the "expected" value, with the first character returning "0" from peekchar. That's good. The bank your characters reside in doesn't actually make a difference to the peekchar/pokechar values.

*** (): INFO, bank #32, GFX Block #0 starts @ $C000
        tileset_blanks tileset_grassy tileset_lake tileset_fort
        scoredigits_8_wide alphabet_8_wide
*** (): INFO, bank #32, GFX block #0 has 0 bytes left (0 x 16 bytes)

Last question, before I leave you to it. Are you sure mytemp1 and mytemp2 are dimmed to otherwise unused variables? :) 

 

Link to comment
Share on other sites

36 minutes ago, RevEng said:

No worries. I'm glad to leave it in your hands, and I'm glad to continue working things out too. Whatever it takes.

 

Last question, before I leave you to it. Are you sure mytemp1 and mytemp2 are dimmed to otherwise unused variables? :)

Thanks yeah it's the last major piece to the engine other then refinement. Everything else is fairly solid besides platform detection (crucial to making a platformer fun). So im determined to make it work one way or another ?Once the engine is nailed then i can take level design more seriously.

 

Yes indeed the mytemps are dimmed to their own independent variable locations. The ramcharmap sample code i broke down worked fine other then a sprite display bug, the platform part was all good though, so i thought it was enough.

Edited by TwentySixHundred
  • 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...