Video: Lesson P10 - Tilemap graphics on the MSX1

MSX & MSX2 including the V9990 GPU (V9K)
Post Reply
User avatar
akuyou
Posts: 421
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: 421
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: 421
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: 23
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 12 times
imagetoconverttomsxtilespng.png
imagetoconverttomsxtilespng.png (164 Bytes) Viewed 397 times
OpenMSXoutput.PNG
OpenMSXoutput.PNG (27.68 KiB) Viewed 397 times

User avatar
akuyou
Posts: 421
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 16 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

Post Reply

Return to “MSX & MSX2 Assembly Programming”