1

Hi !

After experimenting by trial and error many configuration of the LSPC timer interrupt feature, I finally succeded in a 60FPS parallax floor perspective effect:



The code is pure C though the NGDEV kit https://github.com/dciabrin/ngdevkit/

I share the base code, if someone want to try and find sme improvments or make some other interesting effects:

Execute this one time in your vblank callback:

// TIMER SET-UP *REG_TIMERHIGH = 0; *REG_IRQACK = 7; // reload when 0 reached | reload at start frame | reload when TIMERLOW is written | enable | 0000 *REG_LSPCMODE = 80; // 0 1 0 1 0000 - start frame only step = 0; startEffect = 0;
The timer callback and a few variables:

u16 startEffect = 0; u16 step = 0; void rom_callback_Timer() { // skip useless lines, it is the 1st condition to make it very fast if (startEffect != 0) { startEffect--; return; } // if (step > 1) { // here add the code being repeated every 2 lines // for example change a sprite X value to make a skew or distortion step--; return; } if (step == 0) { // initialisation at start frame *REG_LSPCMODE = 208; // 1 1 0 1 0000 - activate time reload *REG_TIMERLOW = 767; // time corresponding to 2 lines refresh startEffect = 65; //this value can be changed. 65 means the effect will start at middle screen step = 130 - startEffect; return; } // this code executes only when your frame is over *REG_LSPCMODE = 80; // 0 1 0 1 0000 - back to start frame only for proper loop frame to frame step = 0; }

2

cool effect top but if I remember correctly, parallax means something different.

3

J'adore !!
Une tres bonne idee pour la neogeo !
avatar
La Neo Geo CD à son site (en tout cas elle essaye...): http://neogeocdworld.info/
Le forum de la Neo Geo sur Yaronet: forums/264

Un petit site sur l'Atari Falcon avec plein de trucs bon pour votre poussin: http://falcon.ti-fr.com/

4

I love this effect!!! Games like Space Harrier use this!!! I think they call them super scalers! Neo Geo can definitely bust out some super scaling! Its really cool that NGDevkit has got alot of love poured into it! I'm too deep in DATLib at the moment to switch over to NGDevkit. Does anyone know how to bust out this effect in the DATLib environment? The long lost HP the Man this might be a you question. Will you ever rejoin us for some banter?

5

With sprite 3D using shrink ability.

6

Really impressive cool
avatar
Highway Runners, mon jeu de racing à la Outrun qu'il est sorti le 14 décembre 2016 ! N'hésitez pas à me soutenir :)

https://itunes.apple.com/us/app/highway-runners/id964932741

7

Love it smile

8

Amazing work! This reminds me of the game Harrier.
avatar

9

Is that the maximum number of sprites that you can get on screen? Or would it be possible to do more, like outrun or space harrier?
avatar
Highway Runners, mon jeu de racing à la Outrun qu'il est sorti le 14 décembre 2016 ! N'hésitez pas à me soutenir :)

https://itunes.apple.com/us/app/highway-runners/id964932741

10

We can have more sprites. Something close to Space Harrier should be possible.

11

12

love
avatar
Highway Runners, mon jeu de racing à la Outrun qu'il est sorti le 14 décembre 2016 ! N'hésitez pas à me soutenir :)

https://itunes.apple.com/us/app/highway-runners/id964932741

13

Joli travail smile
Les rasters non plus de secret pour toi maintenant smile
J'aime le style Space Harrier like qui est tout a fait faisable sur la Neo.

14

Ca reste de l'alchimie. Dire que cela n'a plus de secret pour moi, je n'irai pas jusque là.

15

Lol
Comment ca les interruptions détournées pour changer la palette pendant le flux du canon à électron du tube cathodique ca te parles pas ??
Lol
C'est vraiment sympa ce que tu as réalisé en tout cas, full C ou un peu d'asm dedans au fait ?

16

Rien de plus que ce qui est décrit là-haut.

17

looks very good... Viewpoint 2064 comes to my mind! smile
maybe this would be a better project than another classic 2d-shooter?

18

There are many gameplays possible. I don't believe in a whole 2D shooter game, but in a mix of gameplays, like Contra.

19

This is really great! Hope you keep improving it into a full game. I have always wonder why so few (almost zero) super scalar games on the Neo Geo? Only thing that comes to mind is that changing the sprite priorities is a pain (and slow).

Just looking at the code you posted - you can speed it up further by setting the timer to skip over the first N lines of the screen - until the effect starts. There is no need to have timer interrupts happen at all on lines where there is no 'effect'. They are quite slow in themselves

20

Super scalar was really Sega's hallmark, it didn't really happen much on other machines anyway. It was super impressive back in the 80s, but by then the focus had switched to something influenced from Mario Bros and the likes. Also, when competitors started to provide very fast rendering on a bitmap (instead of raster rendering, line by line), it was when memory became faster and cheaper, and we were moving to 3D.
It's also not obvious to do on the Neo (I have still not understood how he skews sprites mid-frame, I thought you couldn't touch the sprite list in real time because the hardware did some form of prefetch and caching it for rendering confus).
avatar
Highway Runners, mon jeu de racing à la Outrun qu'il est sorti le 14 décembre 2016 ! N'hésitez pas à me soutenir :)

https://itunes.apple.com/us/app/highway-runners/id964932741

21

CosmicR (./19) :
Just looking at the code you posted - you can speed it up further by setting the timer to skip over the first N lines of the screen - until the effect starts. There is no need to have timer interrupts happen at all on lines where there is no 'effect'. They are quite slow in themselves

Yes I tried to do that, but I wasn't success. Changing the speed 2 times in 1 frame update didn't work. Maybe did I something wrong, or maybe there is a proper way to do it ? Playing with the LSPC is a kind of alchemy, especially though C code., I hope to figure out more things about it in the future.