Layer 2 BMP data

Discuss game and other programming topics not specifically covered in another forum

Moderator: Programming Moderators

User avatar
Sludge
Posts: 30
Joined: Wed May 31, 2017 12:37 am
Location: England

Layer 2 BMP data

Postby Sludge » Wed Nov 15, 2017 6:34 am

Where does the data for the layer 2 reside?

I presume it must be on a directory on SD?

If thats the case gamers could just browse the SD folder and check out what later levels contain, a bit of a spoiler in other words.

NeroTS
Posts: 9
Joined: Sat Jun 24, 2017 10:23 am

Re: Layer 2 BMP data

Postby NeroTS » Wed Nov 15, 2017 12:14 pm

I don´t know if there´s a Load a real bmp from sd command.
I use Nextgrab with option BITMAP to make a bmp into 48k data and load it from sd into memory, I already done a compress /uncompress to save memory, so u maybe could make a code that compress or encrypt the data for bmp so it´s not a directly "seeable .bmp"

User avatar
varmfskii
Posts: 167
Joined: Fri Jun 23, 2017 1:13 pm
Location: Albuquerque, NM USA

Re: Layer 2 BMP data

Postby varmfskii » Wed Nov 15, 2017 11:34 pm

There is a real read layer2 from BMP command. If you look at zesaurx for example, it has a few BMPs in one of the MMC images do demo layer2. That said, there are a number of reasons for your game you should take a different tack. I would suggest that you store your image as four fields, all compressed. One for the palette, and three for each 16k that can be mapped hidden under the ROMs. This means they take up less space and are not trivial for the user to just look at. Since you are going to use them in your game, you know implicitly what they are and don't have to use a particular magic number or standard extension.

There are a bunch of compression techniques that should work well given the constraints of the system you are running it on.
Backer #2741 - TS2068, Byte, ZX Evolution

User avatar
sol_hsa
Posts: 82
Joined: Fri Jun 02, 2017 10:10 am

Re: Layer 2 BMP data

Postby sol_hsa » Fri Nov 17, 2017 12:32 pm

I assume Sludge assumes the only way to put stuff into layer2 is to load .bmp:s from the SD card. I presume, hope, and assume this is not the case; the layer2 will be accessible directly in memory and the games can put stuff there like they do to any other buffer.

philipstephens
Posts: 33
Joined: Mon May 29, 2017 8:38 pm

Re: Layer 2 BMP data

Postby philipstephens » Sat Nov 18, 2017 4:50 am

sol_hsa wrote:
Fri Nov 17, 2017 12:32 pm
I assume Sludge assumes the only way to put stuff into layer2 is to load .bmp:s from the SD card. I presume, hope, and assume this is not the case; the layer2 will be accessible directly in memory and the games can put stuff there like they do to any other buffer.
Yes, it goes without saying that layer 2 has a graphics buffer in memory. It's 48 KB in size, so mapping the entire thing into the 64 KB address space is not really plausible, but you can access 8 or 16 KB of it at a time. So certainly you don't need to be loading images into the buffer from the SD card if you don't want to.


Who is online

Users browsing this forum: No registered users and 2 guests