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.
Hi, this is a fast (I think) Parallax fake for the Game Boy Color, all info is in readme.
Is is compiled to use with gbdk, but the C part of the code can be easily converted to asm (if you know how to).
It uses a little 16x16 pixel square, (I was not able to use a 64x64 one like toki tori).
This program uses the SCX and SCY registers to copy a specific frame of an animation to the parallax tiles, so this does not depend on anything else, just the scx and scy, and can be used with other functions.
In the sample demo, it works perfect, but using it with other functions may cause the dma function to write data outside vblank. I'm trying to use it in my puzzle game, but it usually produces garbage on screen because of this.
Hope it is usefull for someone.
Source and rom: https://github.com/mills32/Parallax-eff … -Boy-Color
Use pad to move screen.
Last edited by Mills (2018-01-04 10:59:56)
Offline
Nice one good job. Does it use ZGB ?
Last edited by npzman (2018-01-03 02:24:23)
Offline
Please make an ASM only version. This would be incredibly useful to me if it weren't in C.
Offline
DevEd wrote:
Please make an ASM only version. This would be incredibly useful to me if it weren't in C.
My ASM knowledge is limited, Anyway it only has a bunch of "if" in c, to compare values, everything else is asm. If you know how to compare very big numbers in asm, you can easily port it.
Offline
Is there a C only version, this would be useful for me.
Offline
you can write to HDMAx_REG's to rewrite DMA_TRANSFER() into C, and you can use several memcpy()'s for CPU_TRANSFER() replacement - that would be slower, but still work.
Offline
#define DMA_TRANSFER(sour, dest, sz) \
HDMA1_REG = (UBYTE)((UWORD)(sour) >> 8), HDMA2_REG = (UBYTE)(sour), \
HDMA3_REG = (UBYTE)((UWORD)(dest) >> 8), HDMA4_REG = (UBYTE)(dest), \
HDMA5_REG = (UBYTE)(sz)
...
DMA_TRANSFER(&tiles, 0x8000, (0x10u - 1) | 0x80); // transfer 16 tiles using H-Blank DMA
Offline
thank you yery much
Offline