Jump to content
Sign in to follow this  
R_Leo_1

(7800 Basic) Plotmap for 320B mode

Recommended Posts

So I'm trying to get a 320B map displayed on the screen and I just can't get it to work. I'm using tiled to create the map and I'm not sure if my tile size is incorrect or what is causing the issue, but any assistance would be appreciated.If I comment out any code relating to the .tmx file, then the code compiles just fine. This is the code:

 

rem * Journey to the West
set doublewide off
set tv ntsc
set romsize 48k
set screenheight 224
set basepath gfx_JourneyWest
displaymode 320B
set zoneheight 16
rem * color palette 0
P0C1=$0F
P0C2=$2A
P0C3=$45
rem * color palette 4
P4C1=$C9
P4C2=$38
P4C3=$C4
rem * load gfx & mapfile
incgraphic wukong_front_top.png 320B
incgraphic wukong_front_bot.png 320B
incgraphic Tiles.png 320B
characterset Tiles
incmapfile Level.tmx
init
clearscreen
plotmap Level 4 0 0 20 14
savescreen
drawscreen
mainloop
BACKGRND=$00
restorescreen
plotsprite wukong_front_top 0 80 112
plotsprite wukong_front_bot 0 80 128
drawscreen
goto mainloop
If you need to see the tiled file or anything else, just let me know.

Share this post


Link to post
Share on other sites

Nothing immediately jumps out at me as being obviously wrong. What errors are you getting, and does it compile if you include incmapfile but remove plotmap? The level.tmx file should be in the gfx_JourneyWest folder as well if it's not already.

Share this post


Link to post
Share on other sites

http://atariage.com/forums/topic/267116-plotmapfile-fun-with-mario-and-shantae-tiles/page-1

If you look at the above post, scroll down to the INXS and Ghosts n Goblins screens, the code is there for download for the 320B screens. I will look later also.

 

Edit: If you have setdoublewide to "off", shouldn't the tilemap be 80 tiles in width? I might be wrong about that. In the INXS example above, I have setdoublewide to "on" and the tilemap width is 40 blocks.

 

I think that's right because the width of a character in 320B is 4 pixels, so 4 pixels x 80 tiles = 320 pixels. I think then your plotmapfile command in your code should have the parameters: 0 0 80 14. Your Tiled map also must be 80 by 14.

Share this post


Link to post
Share on other sites

Nothing immediately jumps out at me as being obviously wrong. What errors are you getting, and does it compile if you include incmapfile but remove plotmap? The level.tmx file should be in the gfx_JourneyWest folder as well if it's not already.

 

This is the error I'm getting:

 

Error_zpslgjb4rra.png

 

It doesn't compile if I include incmapfile, any reference to the .tmx file and the code wont compile.

 

 

http://atariage.com/forums/topic/267116-plotmapfile-fun-with-mario-and-shantae-tiles/page-1

 

If you look at the above post, scroll down to the INXS and Ghosts n Goblins screens, the code is there for download for the 320B screens. I will look later also.

 

Edit: If you have setdoublewide to "off", shouldn't the tilemap be 80 tiles in width? I might be wrong about that. In the INXS example above, I have setdoublewide to "on" and the tilemap width is 40 blocks.

 

I think that's right because the width of a character in 320B is 4 pixels, so 4 pixels x 80 tiles = 320 pixels. I think then your plotmapfile command in your code should have the parameters: 0 0 80 14. Your Tiled map also must be 80 by 14.

 

Thank you for this, the only issue with it being 40 characters is the compiler will throw an error if the number of tiles is greater than 32, so I wouldn't really be sure how to get around this.

Edited by R_Leo_1

Share this post


Link to post
Share on other sites

Hmm. I also remember having to make sure the tilesets were in a single row and that they had to be indexed before I imported them into Tiled. I also had to "embed" the tilesets in Tiled, otherwise it would result in compile errors.

 

Have you gotten any 320B graphics to work?

Can you use a format like I did with doublewide on? Also if you have too many unique tiles, the program will not compile.

If you want, you can upload a zip file with your tiles and Tiled files and I can try to get it to work, but it's been a really long time since I've tried this.

Share this post


Link to post
Share on other sites

"blanks" is an undefined symbol in your list. Did you use a "blanks" graphic file during the map creation, which you haven't imported into your basic program?

Share this post


Link to post
Share on other sites

Hmm. I also remember having to make sure the tilesets were in a single row and that they had to be indexed before I imported them into Tiled. I also had to "embed" the tilesets in Tiled, otherwise it would result in compile errors.

 

Have you gotten any 320B graphics to work?

Can you use a format like I did with doublewide on? Also if you have too many unique tiles, the program will not compile.

If you want, you can upload a zip file with your tiles and Tiled files and I can try to get it to work, but it's been a really long time since I've tried this.

 

I changed doublewide to on and I used plotmapfile instead of just plotmap and the programmed compiled properly, thanks for the help!

 

Screen_zpsimntlpli.png

 

"blanks" is an undefined symbol in your list. Did you use a "blanks" graphic file during the map creation, which you haven't imported into your basic program?

 

I did previously have the blank tiles imported into the basic program, but I have removed them since making this post because I realized they go unused, thanks for the tip!

  • Like 4

Share this post


Link to post
Share on other sites

I love it. Sharp title screen. I can't wait to see what you do with it.

Thanks a ton!

Share this post


Link to post
Share on other sites

 

She a fan of those old Chinese folk stories?

 

She grew up in China. Read the book and also remembers the tv series fondly

 

Share this post


Link to post
Share on other sites

 

She grew up in China. Read the book and also remembers the tv series fondly

 

 

Oh wow, that's pretty neat! I've actually watched some clips of this for inspiration.

  • Like 1

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...