Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2013-01-02 16:05:18

paulc
Member
Registered: 2012-10-23
Posts: 27

GBDK seems to limit sprite tiles to 40 tiles even in 8x16 mode...

So using 8x16 sprite mode, I think you should be able to have up to 80 sprite tiles total. But GBDK seems to be limiting the display to just 40 tiles. Anyone ever encountered this?

And I'm sure I'm in 8x16 mode because the tiles stack on top of each other.

Offline

 

#2 2013-01-02 18:06:40

Mills
Member
Registered: 2012-12-21
Posts: 132

Re: GBDK seems to limit sprite tiles to 40 tiles even in 8x16 mode...

paulc wrote:

So using 8x16 sprite mode, I think you should be able to have up to 80 sprite tiles total. But GBDK seems to be limiting the display to just 40 tiles. Anyone ever encountered this?

And I'm sure I'm in 8x16 mode because the tiles stack on top of each other.

Hey, I also tested it, and i went crazy when trying to assign a number to the tiles when using .c, I couldn't use more than 40. I tested using the sprites in .z80 format, it didn't complain when i set 43 sprites at once. I'll try to move all of them on screen and see what happens.

Last edited by Mills (2013-01-02 18:17:44)

Offline

 

#3 2013-01-03 01:18:05

paulc
Member
Registered: 2012-10-23
Posts: 27

Re: GBDK seems to limit sprite tiles to 40 tiles even in 8x16 mode...

I should also mention that the tiles seem to be loading in the VRAM just fine. I'm animating the sprites and I can see them all in the VRAM. But using BGB, which colors in the VRAM which tiles are displaying on screen, I can see that it's stopping on the 40th tile for some reason.

By the way, Mills, how did you put together that color Simpsons image of the aliens? Did you have to draw that by hand or were you able to paste into GBTD?

Offline

 

#4 2013-01-03 07:30:23

Mills
Member
Registered: 2012-12-21
Posts: 132

Re: GBDK seems to limit sprite tiles to 40 tiles even in 8x16 mode...

paulc wrote:

I should also mention that the tiles seem to be loading in the VRAM just fine. I'm animating the sprites and I can see them all in the VRAM. But using BGB, which colors in the VRAM which tiles are displaying on screen, I can see that it's stopping on the 40th tile for some reason.

By the way, Mills, how did you put together that color Simpsons image of the aliens? Did you have to draw that by hand or were you able to paste into GBTD?

I did it, this shows 80 sprites in 8x16 mode: https://dl.dropbox.com/u/757056/GameBoy … prites.zip
Now i convert all tiles and sprites to .s, i don't know if it works with .c.

To do the simpsons image, I pasted the image into GBTD, but I had to paste parts of the image, not all at once, for example, I pasted one alien, and then the other, and then I made the sky with just one blue tile.

Last edited by Mills (2013-01-03 08:54:17)

Offline

 

#5 2013-01-04 00:16:56

paulc
Member
Registered: 2012-10-23
Posts: 27

Re: GBDK seems to limit sprite tiles to 40 tiles even in 8x16 mode...

Hmm, for some reason it looks like it's still only displaying ~32 tiles (~16 sprites in 8x16 mode) on the screen at a time. I tried messing around with it but no luck yet. This is the blue circles stacked on top of each other, right?
(It is loading up more than 40 tiles, just not displaying them all)

Are you looking at the VRAM in BGB? If you colorize the OBP1 and OBP2 it will also colorize which tiles are being used in the VRAM on the screen.

I'll be trying this in ASM, which will hopefully solve it, but I appreciate the help.

Offline

 

#6 2013-01-04 07:25:24

Mills
Member
Registered: 2012-12-21
Posts: 132

Re: GBDK seems to limit sprite tiles to 40 tiles even in 8x16 mode...

paulc wrote:

Hmm, for some reason it looks like it's still only displaying ~32 tiles (~16 sprites in 8x16 mode) on the screen at a time. I tried messing around with it but no luck yet. This is the blue circles stacked on top of each other, right?
(It is loading up more than 40 tiles, just not displaying them all)

Are you looking at the VRAM in BGB? If you colorize the OBP1 and OBP2 it will also colorize which tiles are being used in the VRAM on the screen.

I'll be trying this in ASM, which will hopefully solve it, but I appreciate the help.

Ups you are right, it loads 80 but dosen't display them all at the same time because of the code, i fixed it, now it shows 80 sprites at the same time! https://dl.dropbox.com/u/757056/GameBoy … prites.zip

Offline

 

#7 2013-01-05 22:25:38

paulc
Member
Registered: 2012-10-23
Posts: 27

Re: GBDK seems to limit sprite tiles to 40 tiles even in 8x16 mode...

The demo is great, and displays 80 sprites on the screen, but how can you get more than 40 unique tiles on the screen? According to the VRAM, it's only drawing from the first 40 tiles in the sprite bank. But there are other games that use more than that.

And in GBTD, did you have to paste the image in 8x16 chunks or something? I wonder if it might be faster for you to use PCX2GB (in greyscale) then assign color values yourself afterwards.

Offline

 

#8 2013-01-07 12:07:56

Mills
Member
Registered: 2012-12-21
Posts: 132

Re: GBDK seems to limit sprite tiles to 40 tiles even in 8x16 mode...

paulc wrote:

The demo is great, and displays 80 sprites on the screen, but how can you get more than 40 unique tiles on the screen? According to the VRAM, it's only drawing from the first 40 tiles in the sprite bank. But there are other games that use more than that.

And in GBTD, did you have to paste the image in 8x16 chunks or something? I wonder if it might be faster for you to use PCX2GB (in greyscale) then assign color values yourself afterwards.

I tried PCX2GB, it did't work very well for me. I pasted the aliens image in chunks containing 5x6 tiles or so.

I don't know how so,e demos use more than 40 sprites, maybe they use asm.  GBDK just uses 40 sprites, if they are 8x16 they can't be separated in two 8x8 sprites, i think...

Offline

 

#9 2013-01-07 13:45:50

paulc
Member
Registered: 2012-10-23
Posts: 27

Re: GBDK seems to limit sprite tiles to 40 tiles even in 8x16 mode...

I tried the 40 8x16 sprite thing in ASM to use 80 unique tiles and it seems to work fine. This maybe just a glitch in GBDK that it limits which tiles you can draw from for sprites. So I guess the solution is just use ASM

Offline

 

#10 2013-01-14 18:52:17

Mills
Member
Registered: 2012-12-21
Posts: 132

Re: GBDK seems to limit sprite tiles to 40 tiles even in 8x16 mode...

paulc wrote:

I tried the 40 8x16 sprite thing in ASM to use 80 unique tiles and it seems to work fine. This maybe just a glitch in GBDK that it limits which tiles you can draw from for sprites. So I guess the solution is just use ASM

Hey paulc, I read in another forum, you played wav recordings on a game boy, How did you do that?

I tried using sox, and audacity... I got nice sounding 4-bit wavs. Then I convert the wavs to c or s arrays, and play them in the GB, but the sound is horrible, with lots of noise.

Thanks

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson