** Sega MD 3D engine update 7 **
Speed up rendering by another 15-20 % !
Massive unrolling of the line drawing hotpath has seen a good pickup in the rendering although further improvements are needed , particularly for small triangles as most of the overhead is not in the drawing ( more time in setup vs drawing ) .
Added partial drawing of Quads , this was a major pain due to all the edge cases , as Quads are basically a triangle top (optional) - a middle trapezium and a bottom triangle (optional) and any part can be clipped or offscreen .
Implemented a frame pacing algorithm for the camera so as Frame rate fluctuates with detail the forward Z rate is altered, its as bit janky still .
Track control just snaps back to position after it runs through a short sequence.
Work continues on Parodius and we have some cool things to show in a video soon .
#SGDK #SegaGenesis #MegaDrive
** Sega Genesis 3D Engine Day 3 **
Blast Processing kicks In !!
Converted the Line Drawing and Triangle drawing to 68k Assembly and gained 25% in the line drawing and 33% speedups in the triangle drawing vs C ( so far ) .
The scheduler calculating the vertexs is still in C , just the drawing routines are now are in assembly . Possibly 5-10 % gains will come from the scheduler being in ASM also.
The Line and Triangle drawing C code took some beating , it was surprising - particularly the line drawing to get a speed up over the C code in ASM.
I guess its not too surprising as the C code was basically handling pointers and integers so I had to get exotic to find the speedups.
Initially my ASM Line draw was 100% slower than the C code - the first pass conversion from C to ASM is always rough as its more about getting it working then refine later , but yeah 100% slower on first pass was brutal, after 4 hrs tweaking it was 25% faster than the C code so thats a good start - might get more yet.
So added more squares and more triangles for load testing at the same frame rate.
Its still not anything cohesive but right now focussing on performance in rendering to see how much can be pushed. As rendering will be the biggest cpu soak the faster that goes the better.
The smaller triangles take about 1/3 the CPU time of the larger triangles at present so theres definately a fill rate limit vs the setup time to consider. The same would go for the squares been line framed - smaller ones would allow al lot more .
#SGDK #SegaGenesis #SegaMegadrive
Esta computadora fue testigo de tus sueños y de tu pasion..Gracias a quienes lo siguen recordando y honrando con tanto cariño...Soy la mama de Genesisfan64...
#SGDK independent ceiling, not mirrored so curves, up and down sections have sense. ship readded. to improve performance, black sections are not filled, so if a bg_b is used, it will be shown
BREAKING: The NVM has acquired the mythical Nintendo Playstation! 🤯
This Sony MSF-1 is the OLDEST known existing Nintendo Playstation hardware artifact, and is the original development system for Sony’s planned Super Nintendo CD attachment. It is the ONLY known unit to exist!
One of the biggest “What Ifs” of all time now lives here at the NVM! #nvmusa
** MEGA Parodius Scaling Effects Part 2 **
Well - this is the BIG one - literally !!
Huge thanks to my team @GabrielPyron & @VTRCHIPMUSIC for their efforts. Pyron has provided all the source frames for Puyon and his spikes / explosion and a lot of analysis video on how the spikes behave / move which was really helpful. Pyron also used his CRT setup for this video as we felt an emulator video would not do it justice - running on 100% real MD hardware FTW. Vector has provided the catchy boss music and its sounding great - as always !
The coding on this has been a bit insane - things done since part 1 post previous:
Implemented dual buffering - Last video was single buffered - so VRAM is very tight now , we only have about 40/2048 tiles free. For the longest time I didn't think it would fit - I found a vram jigsaw puzzle that made it work in the end. Double buffering has cleaned up the stability of the animation and matches the arcade scaling effect now albiet costing 2x more VRAM .
Vertical Scaling Implemented - the vertical scaler was taken from Lufthoheit ( my other shooter ) and its heavily optimised to reduce cpu usage. During the scaling the vertical scaler partitions the 68k processor registers into 2 sets, 4 registers are allocated to feeding the fast horizontal interrupt (h-int) that drives the vertical scaling , remaining 12 registers are for the horizontal scaler running in the background. This setup is much faster than normal backup / restore register methods, as we do not need to backup / restore registers in the h-int which would double CPU costs. The catch is the momment any background routine tries to use the H-ints registers it would break things so it has to be carefully timed.
Added the spike projectiles - this was very tricky to get close to the arcade, they are semi heat seeking missiles basically and hence needed code that worked out angle differences to player at speed theres no time for arc-tan or similar so it uses faster lookup tables to work out the angles . They speed up over time and get larger and whats more we can't keep all the scales in VRAM - we have room for 2 spike buffers only. Also what was a real pain was working out scaled coordinates for the circular launch of the spikes .
Added Fish Damage - Shock frame and Explosion frames from Arcade . Very proud of the fact we have the full arcade quality explosion is which is fully scaled also.
Added Temporal Masking - which is fancy wording for don't draw nothing to buffer if nothing is there already there for the scaling . So empty Corners and edges can be optimised out to lower cpu costs and rom costs. I had to make some scripting for this and work out what areas did not need drawing at all in the frame, which should be force cleared by cpu and which areas should just be copied from rom. This reduced rom size by 30 kb and with a bit more work we could extend that to 60 kb & get a bit more speedup even doing so.
Added a frame limiter . In the last video update we let the 68k burn hot and just pump out frames as fast as it could - here we match the arcade animation rate which does leave the cpu idling at times , particularly in the smaller frames - even at large though we could be running the animation 25 % faster , issue is though that would speed up the game logic and make it less arcade accurate. We had some real bullet / Spike hell simulations going without the limiter but yeah we had to tone it down a bit. Maybe in a hardcore mode we could let it run wild though !
Code is 95% 68k assembly with about 5% C code (v-int as its cold path ) driving things . This sort of thing needs all the speed it can get !!
Well now after all that I can return to finish off Level 1 haha - just a wee sidetrack there . No doubt we will polish stage 8 boss some more in time too !!
#SegaMegadrive #SegaGenesis #Parodius #SGDK
** MEGA Parodius Scaling Effects Part 1 **
One of the big challenges with the Parodius Megadrive port is Stage 8's boss - The puffer-fish *Pooyan* with his full screen scaling effect.
The goal is to be very close to the arcade (with extras on top ) so I thought lets tackle it head on to see how close we can get. I was also keen to jump into another scaling code rabit hole haha.
@GabrielPyron pulled out all the stops and got me the source frames and reworked the BG tiles for this test - a big thankyou to him , @VTRCHIPMUSIC is busy working on Stage 2 tracks so the team is working hard all round on this port.
The MD has no sprite / background GFX scaling hardware , however the VDPs Vertical scroll can be updated per scanline to help vertical scaling on backgrounds, but there is a cpu cost to manage all the interupts so thats not free either.
With the Horizontal scaling there is no help at all , apart from a semi-friendly packed pixel format for the cpu to work with, its not quite chunky format but better than planar format still for scaling. So its falls back to the 68k CPU to do all of the horizontal expansion which is the largest cpu cost. Basically drawing strips of either 1x, 2x, 3x or 4x wide columns at speed.
So we are one week into this Boss's routine and you can see from the below video the horizontal scaling is implented ( vertical will be in the next update ) . We are scaling from 1x to 4x in the video below in 74 steps for testing . The column distributions are always a bit painfull to do - thankfully they are all worked out now.
This is the third scaler I have built and the goal was with this one to make it really flexible for use in other projects also, sometimes when you optimise something to the last degree all the flexibility gets taken out of it.
Currenty scaling at 12-25 FPS update here, I had some rules against some optimisations which I would use and some I wouldn't , thankfully we are a bit ahead of the Arcades animation frame rate here still and I may yet find optimisations that fit within the scope.
We have vertical scaling and sprite spikes to add yet so Im hoping i can find a few more optimisations to offset things when they are implemented also.
In a scale frame update we are processing close to 42000 pixels in ram before using DMA to send to VRAM . Using a 41x16 (656 tile scale buffer) - single buffered for now due to its size in VRAM. So thats nearly 21k in tiles ! I had to re-organise ram a bit to support a buffer of that size for the stage.
The scaling function is written in 68k assembly , with a little C code handling the Vertical interupt code ( so the game logic can actually run & DMA updates etc ) . The DMA routines are in assembly also and customised for large chunk size ( big blocks of tiles ) which suits the scaler. I had some race conditions to sort out where the cpu was faster than DMA (sending tiles from RAM to VRAM ) and in some cases where it wasn't so it had to be balanced.
We may be able to add more detail into the top and bottom of the background yet but its low priority for now until all the other bits are in !!
#SGDK #SegaMegadrive #Genesis #Parodius
SURPRIIIIIIISE!!! The beta release of our Grand Theft Auto Vice City port to the Sega Dreamcast is finally here! Here's an actual hardware capture of raising some hell in the beautiful streets of Miami taken straight from my DC to celebrate!
We've now added graphics settings for 2xFSAA to give it a less jagged, more smooth look and have added a video mode for rendering to a 24bpp framebuffer, which adds extra depth and vividness to the colors!
While we still have plenty of work to do regarding features, assets, and performance, I am extremely proud of our team after what we've accomplished within just a few short months with this port that, for the last two decades, was considered literally impossible for the console to handle. It has been an absolute honor and privilege to work beside you crazy and talented bastards!
I also want to thank the Sega Dreamcast and Grand Theft Auto communities for rallying around this cause and coming together to help us test and debug this release along with the previous GTA3 release over the last several months. Your support and diligent work has been vital for ensuring that the games have been fully playable on the DC, and your constant support and feedback has been an inspiration to the team. We couldn't have done it without you!
For instructions on how to convert your (LEGALLY EFFING PURCHASED) PC versions of GTAVC into a image which can be played on the DC, the instructions can be found here: https://t.co/JP09oENw3j
PS: No, this is not an April Fool's joke, but we're going to love everyone thinking it is! Guess you're gonna have to try it to find out!🤣
** Parodius Update **
The team - @GabrielPyron , @VTRCHIPMUSIC and I have all been flatout busy .. still we have had time to do some wee bits on Parodius for Sega Genesis.
Since last update :
More colors !! the background now uses Interupt trickery to have 19 colors so far (from 16) . Just got it working today as the lazer interupts colliding with the color change interupts had to be sorted out. So there are more 3 more blues shades in the background. You can see index 0 and index 11 in the CRAM viewer re-using color indexes on the RHS as the screen draws.
Theres about 9 interupts driving lazers and background updates now, the cpu sorting / setup is costing about 8 %cpu but I'll live with it for now.
Stage 1 track reworked by Vector, reduced vgm size to 101 KB ! ( xgm2 further reduces this to 53kb ) And it also includes the choirs, recreated in FM and PSG sound. He promises further enhancements to come too.
Vic Viper Shot and Lazer SFX added , Speed-Up , Lazer Announcer speed samples added . I'm very happy with how the voices turned out in particular , Pyron has supplied modified samples to get better volume levels.
Background collisions for the standard shot implemented , next I'll do the lazer .
More of the vic viper power ups and Power up bar hud / animating water to add yet.
#SGDK #Parodius #SegaMegadrive #SegaGenesis
Today in considerable triumph, I've managed to get Tactus running on my real #nes hardware! Here is a recording from my US Frontloader. This involved porting most of Rainbow into verilog, and lots of cursing. (So much.) #gamedev#homebrew