Video: Lesson P10 - Tilemap graphics on the MSX1

MSX & MSX2 including the V9990 GPU (V9K)
User avatar
akuyou
Posts: 563
Joined: Mon Apr 22, 2019 3:19 am
Contact:

Video: Lesson P10 - Tilemap graphics on the MSX1

Post by akuyou » Wed Apr 24, 2019 9:05 am



www.chibiakumas.com/z80/platform.php#LessonP10

We tried to use the MSX1 VDP as a bitmap display before, that will work fine for text adventures, but it's a bit slow for faster stuff!
The MSX1 VDP is really a Tilemap based system, and will work far 'better' if we work with it in the same way as the Gameboy and Mastersystem...

Also like the Mastersystem, the VDP is controlled with OUT commands... we select a memory address with the Control port (&98), and send our data to the Data port (&98)
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

Rosemary
Posts: 3
Joined: Wed Nov 06, 2019 4:51 am

Re: Video: Lesson P10 - Tilemap graphics on the MSX1

Post by Rosemary » Thu Nov 07, 2019 1:02 am

Hello,

I looked at you sprites and tile map tool :D It would save a lot of time if I know exactly how to use it for my
purposes.
So I have a simple question which is for a custom game completely written in assembly, stored in an 32K MSX ROM cartridge, for an MSX-1.
-I want to load a high resolution screen 2-picture on somewhere in the game's assembly code. As we know there are 768
tiles on screen 2, where each tile is made of 8 bytes and each of these 8 bytes have two colours each, on an MSX1 machine.
Can you give the complete self contained subroutine in assembly for loading a custom screen, made with your tool, in screen 2
of an MSX1 machine? I can't find such a code. I would image it would involve serially writing out 768 tiles and a set of colours
for each tile, and it will also involve copying the tile information stored ROM to the correct address. I do not exactly understand how the .RAW file, exported from your sprite/tile tool,is included in the assembly code and thus the final ROM.

User avatar
akuyou
Posts: 563
Joined: Mon Apr 22, 2019 3:19 am
Contact:

Re: Video: Lesson P10 - Tilemap graphics on the MSX1

Post by akuyou » Thu Nov 07, 2019 3:24 am

Lesson 10 used AkuSprite Editor to create a tile image onscreen, but it only used the 256 tile limited mode, not the one spit into 3
https://www.chibiakumas.com/z80/platform.php#LessonP10

I will make an example for you of loading an image that uses 3x256 tilemaps - however please note AkuSprite Editor cannot currently do the MSX1 color attributes so the image would be black and white.... it's something I can look to add in the future, but you're the first person express interest in it, so it's not been done yet.

I'll knock up a simple example of the MSX1 B/W screen this weekend, and I'll look adding MSX1 color attributes when I can (it's tricky because most other system uses 8x8 attributes , not 8x1)
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

User avatar
akuyou
Posts: 563
Joined: Mon Apr 22, 2019 3:19 am
Contact:

Re: Video: Lesson P10 - Tilemap graphics on the MSX1

Post by akuyou » Sat Nov 09, 2019 6:17 am

I've made a new tutorial covering the use of 768 tile MSX1 mode to show a full screen color image on the MSX1

I've also upgraded akusprite editor so it outputs a second file with the color information in addition to the Black and White bitmap


http://www.chibiakumas.com/z80/platform6.php#LessonP52

If you use Akusprite editor, make sure you select the MSX1 palette from the Tools->Palettes menu... as the color number order needs to be correct for the export to work
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

John
Posts: 40
Joined: Tue Mar 24, 2020 1:18 am

Bug in Akusprite conversion to MSX tiles?

Post by John » Wed Jul 15, 2020 1:57 pm

Hello Keith,

I think there may be a bug in akusprite. So I have a 16x16 BMP test image
(imagetoconverttomsxtiles.bmp in the zip file attached) to convert to MSX 8 by 8 pixel tiles,with 8 bytes in a tile
to demonstrate the problem; thes test image is also shown as a png image in this message.
The problem is that, for the images I converted, when the byte is a line of solid colour, which
corresponds to 0 or 255 in decimal for the byte value, then the byte is not converted properly, in the
attached example the bytes are missing,from the first tile, in the
final tiles output, shown in OpenMSXoutput.png,from the OpenMSX emulator
, of the converted image imagetoconverttomsxtiles.
I am using your definetiles function.
I don't know how to get the version number out of Akusprite but I used the latest dated version I
could find. I am converting with the settings 8x1 MSX colour and RAW MSX 1 bitmap 8x8. I did not convert the colour
only the pattern (setting the colour in the output from OpenMSX is done in code by myself and not using Akusprite).
The .RAW file ,output from the Akusprite conversion, is in the attached zip file.

So is this a bug in Akusprite?
Attachments
akusprite-exampleconvertbytesofspecificvalue.zip
(28.11 KiB) Downloaded 419 times
imagetoconverttomsxtilespng.png
imagetoconverttomsxtilespng.png (164 Bytes) Viewed 7427 times
OpenMSXoutput.PNG
OpenMSXoutput.PNG (27.68 KiB) Viewed 7427 times

User avatar
akuyou
Posts: 563
Joined: Mon Apr 22, 2019 3:19 am
Contact:

Re: Video: Lesson P10 - Tilemap graphics on the MSX1

Post by akuyou » Wed Jul 15, 2020 9:59 pm

I added a function to covert the sprites to Foreground background colors - when the line is all one color, it's setting the line to all zero pixels in the bitmap data - and applying the color in the colormap.

I've altered the code for this instance, please try again with this test copy.
Attachments
AkuSpriteEditor.7z
(93.21 KiB) Downloaded 405 times
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

John
Posts: 40
Joined: Tue Mar 24, 2020 1:18 am

Is this another bug in Akusprite?-Or did I misunderstand something?

Post by John » Sun Dec 20, 2020 5:50 pm

Hello Keith,

This is regarding the Akusprite image conversion to MSX1 screen 2 (the 8x1 color node),
when I am doing a conversion from akusprite , so akusprite generates the exported files
.RAW and .RAW.COL, of the test image for MSX1 screen 2 in 8x1 color , the colors
are not what I expected; the test image is 16 tiles -one for each MSX1 color.
There are 15 visible colors the other color is transparency (as shown
in the attached msx1palette.jpeg)

In the attached

akuspritetoemulatorcolors.jpeg image

you can see I have created, the test image in Akusprite,
which consists of a horizontal row of sixteen 8 by 8 blocks and colored them
consecutively in the order of the palette given in Akusprite toolbar-you can also
see the output of the colors of each tile in BlueMSX (that shows the output
from the files exported from AKusprite), as you can see the output does
not all match the image colors of the original image in Akusprite, for
example the yellow tile (fourth across from left) shows as a shade of
blue in BlueMSX.
I created the 16 uncolored tiles in Microsoft paint then pasted it into
Akusprite with the Akusprite flood fill function,while using the settings
shown in the attached akuspritesettings.jpeg,
to create the test image-however I do not think creating it in Microsoft Paint and
pasting into Akusprite can be a source of a problem, but I mention it anyway.
I am using your code from your screen 2 graphics tutorial to process the
incbins of the .RAW and .RAW.COL.

An obvious thing to notice is that the colors in the Akusprite tool bar
do not match the colors of the MSX1 video palette , e.g. as shown in the
image, msx1palette.jpeg, taken from

https://en.wikipedia.org/wiki/List_of_8 ... iginal_MSX

for example the MSX1 palette has 3 shades of green but there are 2
shades of green in the AKusprite toolbar.

Is the Akusprite toolbar colors suppose to match the order of colors and
orders as shown in msx1palette.jpeg when the msx8x1 setting is selected
-or did I misunderstand how Akusprite is used?

Or is Akusprite expected give jumbled colors for images that use the
MSX1 ,8x1 color mode?

By the way the pattern information correctly exports.
Attachments
akuspritesettings.jpeg
akuspritesettings.jpeg (238.97 KiB) Viewed 6256 times
msx1palette.JPG
msx1palette.JPG (11.1 KiB) Viewed 6256 times
akuspritetoemulatorcolors.jpg
akuspritetoemulatorcolors.jpg (79.34 KiB) Viewed 6256 times

User avatar
akuyou
Posts: 563
Joined: Mon Apr 22, 2019 3:19 am
Contact:

Re: Video: Lesson P10 - Tilemap graphics on the MSX1

Post by akuyou » Tue Dec 22, 2020 8:46 am

Akusprite editor exports files based on color number not shade.

You need to load in the correct palette for the MSX1,

There's an option to set the correct colors:
Tools->Palette>Msx1 Palette

Should set the color palette of Akusprite to be correct, and your exports should now appear in the MSX1 as they do in the editor.

Thanks,
Keith
Msxpal.png
Msxpal.png (11.01 KiB) Viewed 6238 times
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

Lee
Posts: 23
Joined: Sun Oct 10, 2021 1:26 am

Re: Video: Lesson P10 - Tilemap graphics on the MSX1

Post by Lee » Mon Oct 11, 2021 9:19 pm

I am trying to use the RLE lesson 22, to compress MSX tile graphics. When using your RLE tutorial (for MSX) the code below is automatically generated from akusprite

ld hl,RleFile
ld de,RleFile_End
ld bc,RleFile_End-RleFile
ld ix,0
ld iy,0
call VDP_RLEProcessorFromMemory
di
halt
RleFile:
incbin "\ResALL\MSXRle.rle"
RleFile_End:
include "\SrcMSX\Akuyou_MSX_RLE.asm"
LoadDiscSectorSpecialMSX:;Dummy Label - should never run
halt



but there is no Akuyou_MSX_RLE.asm in your sources.zip folder so where do I get Akuyou_MSX_RLE.asm from? I have made the compressed file with Akusprite.

User avatar
akuyou
Posts: 563
Joined: Mon Apr 22, 2019 3:19 am
Contact:

Re: Video: Lesson P10 - Tilemap graphics on the MSX1

Post by akuyou » Mon Oct 11, 2021 11:31 pm

Sorry, I can't remember that lesson,

Can you provide a link to the video, or webpage with that content?
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

Post Reply

Return to “MSX & MSX2 Assembly Programming”