Jump to content

Recommended Posts

Hello,

 

After defining a character set and arranging the Screen layout, I saved the results as: CVBasic, assembler hex, compress all with pletter.

 

Can anyone provide sample code of how the screen layout (screen layout, pletter - SL_PL label) information is used to display the characters on the screen?

 


 

Link to comment
https://forums.atariage.com/topic/366214-cvbasic-and-msxcolecovision-editor/
Share on other sites

Posted (edited)

Minor update,  I used the following code and something is displayed on the screen.   The pattern of where the tiles were placed is there, but the characters are off.  My main problem was putting the INCLUDE statement at the top of the file.  I moved it to the very bottom and got this:

 

DEFINE CHAR PLETTER 32,80,TILESET_1_PAT_PL
DEFINE COLOR PLETTER 32,80,TILESET_1_COL_PL 
DEFINE SPRITE PLETTER 1,3,SPRITE_PATTERNS_default_PL
DEFINE VRAM PLETTER $1800,768,SL__PL
 

image.png.745d31cba3a35949f1a8b6861cd96cf5.png

Edited by OriginalJohn
Posted (edited)

So what is happening in the editor, is that the screen layout is directly proportional to where you put the chars in the editor list.  For example,  if my chars are 0 - 80, you have to define your char as starting at position 0... it will redefine everything from 0 up to where you put your chars.   From about 0-30ish it will not display anything.  I thought that if I moved my chars to position 255 that would fix it, however you still have to define your chars starting at 0 to get the screen to display correctly.

 

So in other words, I have to move all my chars to the screen layout position (say around 255), create my screen.  when I'm done, I move all the chars back to position 0 and up.   The screen layout will be correct when I define the char position in cvbasic and the 'sequence' of chars starting from 0 would then be correct, because I'm definining their position in CVBasic.

 

Another thing that happens in the editor, is if you right click and clear a char, it assigns a value of -1.  When displayed, it adds a char to that position when it should be 'nothing'.  To correct it, you have to find a char that is blank and assign it to that position.

 

For now, it's not feasible to use the screen layout from the editor in CVBasic,  you'll want to go the PRINT AT 0, "\35\36\37\39...etc" route.

Edited by OriginalJohn

It is better to put your image as a 24-bit BMP file, and process it with TMSColor. It will generate the minimum number of tiles, using for example:

tmscolor -t128 -b your_image.bmp your_image.bas your_image

 

On 5/11/2024 at 12:59 AM, OriginalJohn said:

So what is happening in the editor, is that the screen layout is directly proportional to where you put the chars in the editor list.  For example,  if my chars are 0 - 80, you have to define your char as starting at position 0... it will redefine everything from 0 up to where you put your chars.   From about 0-30ish it will not display anything.  I thought that if I moved my chars to position 255 that would fix it, however you still have to define your chars starting at 0 to get the screen to display correctly.

 

So in other words, I have to move all my chars to the screen layout position (say around 255), create my screen.  when I'm done, I move all the chars back to position 0 and up.   The screen layout will be correct when I define the char position in cvbasic and the 'sequence' of chars starting from 0 would then be correct, because I'm definining their position in CVBasic.

 

Another thing that happens in the editor, is if you right click and clear a char, it assigns a value of -1.  When displayed, it adds a char to that position when it should be 'nothing'.  To correct it, you have to find a char that is blank and assign it to that position.

 

For now, it's not feasible to use the screen layout from the editor in CVBasic,  you'll want to go the PRINT AT 0, "\35\36\37\39...etc" route.

Sorry busy weekend, youngest's 18th birthday party, we survived :)

 

By default the Sprite and Tile Editor assumes you are using a single set of tiles (256 patterns) for all three sections of the screen, this really cuts down on the space required to store your screen layout.  I find this to be the case when making game screens (with the exception of splash screens).  But if you want to use them you need to load the tileset into all three tileset positions.  So you need to use the DEFINE VRAM PLETTER command six times e.g. in your case above you would use:

DEFINE VRAM PLETTER $0000,$800,TILESET_1_PAT_PL

DEFINE VRAM PLETTER $0800,$800,TILESET_1_PAT_PL

DEFINE VRAM PLETTER $1000,$800,TILESET_1_PAT_PL

DEFINE VRAM PLETTER $2000,$800,TILESET_1_COL_PL 

DEFINE VRAM PLETTER $2800,$800,TILESET_1_COL_PL 

DEFINE VRAM PLETTER $3000,$800,TILESET_1_COL_PL 

DEFINE SPRITE PLETTER 1,3,SPRITE_PATTERNS_default_PL
DEFINE VRAM PLETTER $1800,768,SL__PL

 

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