SC bitmap file format header?

بواسطة DarkSchneider

Paragon (1030)

صورة DarkSchneider

21-02-2023, 10:22

What I have found is that are 7 bits, but not the content. Has someone the content of the header for SC bitmap files?

Also, the BLTVD subROM function, expects only NX and NY, or the full SC header? For descriptions I have found, it only says that NX and NY are specified in the bitmap file, not much precise.

Login أوregister لوضع تعليقاتك

بواسطة aoineko

Paragon (1137)

صورة aoineko

21-02-2023, 12:08

From what I understand (too bad there is no clear doc on the subject) it is only a VRAM dump. In the header you can find the address in VRAM where to copy the data and its size. The BIOS simply copies this data to VRAM.

The only peculiarity I heard about is for the palette where the MSX2 BIOS uses a VRAM area to store it and I imagine that after copying the data from file to the VRAM, the BIOS copies this palette information to the dedicated VDP registers.

بواسطة DarkSchneider

Paragon (1030)

صورة DarkSchneider

21-02-2023, 12:18

https://www.konamiman.com/msx/msx2th/th-ap.txt

Look for BLTVD: the only parameter that reads from file is NX and NY. But don’t know if it reads a complete SC file bypassing some data, or if only reads 4 bytes (NX and NY) and then the bitmap binary data, or what else.

بواسطة aoineko

Paragon (1137)

صورة aoineko

21-02-2023, 13:02

Yes, I know this function but I don't use BIOS functions exactly because I don't like to use black boxes. ^^
That said, someone who disambled the BIOS could answer your question. Or, if you can read assembler, I think BIOS code is available on the Web (not sure for SubROM).

بواسطة aoineko

Paragon (1137)

صورة aoineko

21-02-2023, 13:15

BTW, the 7 bytes header format of BLOADable file:

Quote:
Byte: #FE (Type of file)
Word: Begin address of file
Word: End address of file
Word: Start address of file (Only important when ",R" parameter is defined with BLOAD)

From: https://www.msx.org/wiki/MSX-BASIC_file_formats

بواسطة wolf_

Ambassador_ (10135)

صورة wolf_

21-02-2023, 13:41

For Scriptile I used bmp2msx to convert stuff to several sc-formats, then used a data monitor to analyze the data. Worked well!

بواسطة DarkSchneider

Paragon (1030)

صورة DarkSchneider

21-02-2023, 13:50

I see the SC format has nothing to do with subROM function.
Well now I have something to begin with, thanks.

بواسطة sd_snatcher

Prophet (3675)

صورة sd_snatcher

21-02-2023, 15:24

DarkSchneider wrote:

https://www.konamiman.com/msx/msx2th/th-ap.txt

Look for BLTVD: the only parameter that reads from file is NX and NY. But don’t know if it reads a complete SC file bypassing some data, or if only reads 4 bytes (NX and NY) and then the bitmap binary data, or what else.

Tip: The BLTVD routine reads SHx files, that are different from the SCx files.

بواسطة DarkSchneider

Paragon (1030)

صورة DarkSchneider

21-02-2023, 18:34

sd_snatcher wrote:
DarkSchneider wrote:

https://www.konamiman.com/msx/msx2th/th-ap.txt

Look for BLTVD: the only parameter that reads from file is NX and NY. But don’t know if it reads a complete SC file bypassing some data, or if only reads 4 bytes (NX and NY) and then the bitmap binary data, or what else.

Tip: The BLTVD routine reads SHx files, that are different from the SCx files.

OK so according to this:

Quote:

On MSX2 and up you can save or restore part of VRAM to/from disk by using COPY.

These files have 4-byte header:

Word: Number of X-pixels
Word: Number of Y-pixels
Graphics are stored after header in native pixel format from left to right and up to down. This means that number of bits/pixel depends of used graphic mode.

There are only NX, NY, and then bitmap data.

Then now it’s all clear, thanks.