ZXodus Engine (rainbow tiles)

Todo sobre la creación, diseño y programación de nuevo software para
nuestro Spectrum

Moderador: Sir Cilve Sinclair

Responder
Avatar de Usuario
cheveron
Manic Miner
Mensajes: 277
Registrado: Lun Jun 28, 2010 6:14 pm
Ubicación: Londres
Contactar:

ZXodus Engine (rainbow tiles)

Mensaje por cheveron » Vie Sep 09, 2011 12:20 pm

Hola!

I know na_th_an of the Mojon Twins has already spotted this, but I thought I'd share with the rest of the Spanish language scene:

ZXodus is a rainbow processor and tile engine that gives you a 9x9 grid of tiles (144x144 pixels with 8x1 attributes) on the original 48K Spectrum. It does work on other models but the timing may need tweaking.

The engine is available here (with source):
http://www.worldofspectrum.org/infoseek ... id=0026639

A simple PNG to tile converter (by na_th_an) is available here:
http://www.mojontwins.com/warehouse/zxodus-conv-0.1.rar

Cheers!

-chev
«Dime con quién andas, y te diré quién eres» — Cervantes

Avatar de Usuario
mcleod_ideafix
Johnny Jones
Mensajes: 3984
Registrado: Vie Sep 21, 2007 1:26 am
Ubicación: Jerez de la Frontera
Contactar:

Re: ZXodus Engine (rainbow tiles)

Mensaje por mcleod_ideafix » Vie Sep 09, 2011 2:40 pm

Cool!! Is the tile block located always at the same screen position, or can you move the 9x9 block to any other screen position (or character position).

PS: I haven't read the source code. Maybe the answer is already there... :)
Web: ZX Projects | Twitter: @zxprojects

Avatar de Usuario
cheveron
Manic Miner
Mensajes: 277
Registrado: Lun Jun 28, 2010 6:14 pm
Ubicación: Londres
Contactar:

Re: ZXodus Engine (rainbow tiles)

Mensaje por cheveron » Vie Sep 09, 2011 2:53 pm

mcleod_ideafix escribió:Cool!! Is the tile block located always at the same screen position, or can you move the 9x9 block to any other screen position (or character position).

PS: I haven't read the source code. Maybe the answer is already there... :)


Well, because of the timing critical nature of the thing you'd have to recalculate the loops and change the screen offsets to put the grid somewhere else, but in theory it is possible. The grid would actually benefit from being on the right hand side of the screen as the attributes are drawn from right to left and the scan line updates from left to right but I wanted to push the machine as hard as possible. The further down the screen you place it, the longer the delay loop you'll have to use before the first line is drawn, so the ideal place to put the grid is in the top right hand corner.

-chev
«Dime con quién andas, y te diré quién eres» — Cervantes

Avatar de Usuario
radastan
Phantomas
Mensajes: 2189
Registrado: Lun May 07, 2007 5:34 pm
Contactar:

Re: ZXodus Engine (rainbow tiles)

Mensaje por radastan » Vie Sep 09, 2011 4:16 pm

Wooooowowowowowowowo! Great effect!

¿How many CPU time is free for the game engine?
_________________________________________
Hay otras páginas.... pero no son Bytemaniacos
http://www.bytemaniacos.com
Orgullo de 8 bits
_________________________________________

Avatar de Usuario
cheveron
Manic Miner
Mensajes: 277
Registrado: Lun Jun 28, 2010 6:14 pm
Ubicación: Londres
Contactar:

Re: ZXodus Engine (rainbow tiles)

Mensaje por cheveron » Sab Sep 10, 2011 6:54 pm

radastan escribió:Wooooowowowowowowowo! Great effect!


Thanks. :)

¿How many CPU time is free for the game engine?


Not a vast amount, but then the engine draws the tiles for you so all you have to do is the I/O and game logic.

-chev
«Dime con quién andas, y te diré quién eres» — Cervantes

Avatar de Usuario
na_th_an
Nonamed
Mensajes: 1889
Registrado: Lun May 07, 2007 10:16 am
Ubicación: Andalucía

Re: ZXodus Engine (rainbow tiles)

Mensaje por na_th_an » Lun Sep 12, 2011 8:06 am

Is there any way of synchronizing with the tile display? In my test from pure BASIC I've found that it's relatively hard to control what delay to introduce so you can "animate" the screen (make a character move from tile to tile) without flickers or ghosting. Is there some memory address where we can read the tile counter and "wait" until the buffered screen is completely updated?

Avatar de Usuario
cheveron
Manic Miner
Mensajes: 277
Registrado: Lun Jun 28, 2010 6:14 pm
Ubicación: Londres
Contactar:

Re: ZXodus Engine (rainbow tiles)

Mensaje por cheveron » Lun Sep 12, 2011 11:00 am

na_th_an escribió:Is there any way of synchronizing with the tile display? In my test from pure BASIC I've found that it's relatively hard to control what delay to introduce so you can "animate" the screen (make a character move from tile to tile) without flickers or ghosting. Is there some memory address where we can read the tile counter and "wait" until the buffered screen is completely updated?


There is no tile counter. But it's relatively easy to add one. Make the following changes to the source:

atflg:
defb 0
+counter:
+ defb 0

t00:
+ xor a
+ ld (counter), a
ld hl, tile_map ; point to tile map

t26:
ld hl, tile_map + 78 ; point to tile map
...
+ ld a, 1
+ ld (counter), a
ret

Now counter (PEEK 65532) will be 0 while the tiles are being drawn and 1 when the map is fully drawn. That will give you a window of 1 interrupt to do anything before it starts drawing the tile map again.

A different approach would be to switch off the drawing of the tile map until you've made your change (by temporarily NOPing the jump to the tNN tile drawing routines) but then it will still take 27 interrupts to draw the map. However you do it you're probably going to end up with some tearing.
«Dime con quién andas, y te diré quién eres» — Cervantes

Avatar de Usuario
na_th_an
Nonamed
Mensajes: 1889
Registrado: Lun May 07, 2007 10:16 am
Ubicación: Andalucía

Re: ZXodus Engine (rainbow tiles)

Mensaje por na_th_an » Lun Sep 12, 2011 11:31 am

That's exactly what I needed. Thank you. If I find the time, I'd like to experiment with it to make some kind of roguelike of sorts. Great job :)

Avatar de Usuario
radastan
Phantomas
Mensajes: 2189
Registrado: Lun May 07, 2007 5:34 pm
Contactar:

Re: ZXodus Engine (rainbow tiles)

Mensaje por radastan » Lun Sep 12, 2011 1:05 pm

na_th_an escribió:That's exactly what I needed. Thank you. If I find the time, I'd like to experiment with it to make some kind of roguelike of sorts. Great job :)


Se me acaban de caer las pelotas al suelo, lo juro.
_________________________________________
Hay otras páginas.... pero no son Bytemaniacos
http://www.bytemaniacos.com
Orgullo de 8 bits
_________________________________________

Avatar de Usuario
na_th_an
Nonamed
Mensajes: 1889
Registrado: Lun May 07, 2007 10:16 am
Ubicación: Andalucía

Re: ZXodus Engine (rainbow tiles)

Mensaje por na_th_an » Lun Sep 12, 2011 1:29 pm

Bueno, es una de las cosas anotadas en nuestra libreta de ideas de cosas para sartar en la corchoneta de sartar (la famosa LIDEIDDECOPASARENLACORDESAR). Estoy dándole vueltas a un generador aleatorio de mapeados que no tarde una hora en hacer uno molón.

Avatar de Usuario
radastan
Phantomas
Mensajes: 2189
Registrado: Lun May 07, 2007 5:34 pm
Contactar:

Re: ZXodus Engine (rainbow tiles)

Mensaje por radastan » Lun Sep 12, 2011 1:40 pm

Si, pero no olvides que tiene que haber colchonetas para saltar entre niveles y puticlubs en las mazmorras. Si no, no es juego mojono.
_________________________________________
Hay otras páginas.... pero no son Bytemaniacos
http://www.bytemaniacos.com
Orgullo de 8 bits
_________________________________________

Avatar de Usuario
na_th_an
Nonamed
Mensajes: 1889
Registrado: Lun May 07, 2007 10:16 am
Ubicación: Andalucía

Re: ZXodus Engine (rainbow tiles)

Mensaje por na_th_an » Lun Sep 12, 2011 2:15 pm

Nah, a nosotros no nos gusta eso del sexo comercial.

Responder

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 0 invitados