Загрузка видео...

Не удалось загрузить видео

На главную

** 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...

18,252 просмотров • 4 месяцев назад •via X (Twitter)

Комментарии: 67

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Thanks my friend 😀 We need to use this somewhere 😉

Фото профиля TheNomCognom
TheNomCognom4 месяцев назад

wow wow wow wow wow. shannon does what nothersdont ;) im waiting each new post from you. damn, as a drug! haha

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Thanks my friend , this 3d thing is a bit like a drug and its an addictive one as you know :-)

Фото профиля TheNomCognom
TheNomCognom4 месяцев назад

haha yes, and you get high when something new or any optimization works! at the end, all weird things im doing give me that haja

Фото профиля CYBERDEOUS - Crouzet Laurent
CYBERDEOUS - Crouzet Laurent4 месяцев назад

@ray_castello @birt_shannon never disappoint! And of course there is still room for more ! ASM god

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

@ray_castello Thanks Cyber 😀 Yes always on the hunt for cpu time !

Фото профиля Dr. Thiago Vinícius
Dr. Thiago Vinícius4 месяцев назад

@Akino_R11NOR Are u rendering all the sides of the figures? You should only render 2 sides (the visible ones)!

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Yes just two sides at present , theres plans for 3 eg roofs as well . One thing that is not optimal at all is the overdrawn currently theres nothing smart about it , it draws back to front and overdrawn everything . If I can come up with a fast method to reduce overdraw eg like a z buffer but cheaper to implement then gains will come from that .

Фото профиля Dr. Thiago Vinícius
Dr. Thiago Vinícius4 месяцев назад

@Akino_R11NOR This is getting big bro! Are u openning the engine after the optimization?

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

@Akino_R11NOR Thanks 😀 It needs a few more features yet to be really usefull and more documentation but ultimately yes .

Фото профиля Dr. Thiago Vinícius
Dr. Thiago Vinícius4 месяцев назад

@Akino_R11NOR Sure! But I see a bright future for this. Just keep going.

Фото профиля Darren Furlong
Darren Furlong4 месяцев назад

Silky smooth , looking imressive so far.

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Thanks 😀 Hopefully i can gmkeep finding performance gains .

Фото профиля Lazycow
Lazycow4 месяцев назад

Have you tested whether it would run more smoothly if you set the screen updates to stable 20 FPS? (instead of having a variable, but higher update rate)

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

It probalbly would be more consistent yes as its average is probalbly 25 at present but its up and down at times - I think i can get the pacing a bit better yet though as it analyzes the frame rate over the last second and adjusts the next seconds z movement rate and that could be a lot more granular. The ship is not adjusting its rotational speed inline with frame rate though so thst could be improved also.

Фото профиля ほっと一息 いれましょ
ほっと一息 いれましょ4 месяцев назад

かなり滑らかに動いてますね。凄い! 浮遊感が気持ちいいです

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Thanks 😀 yes its reasonably smooth at 23-35 fps , ive done some work on altering the forward movement ( z plane ) to move slower if fps is higher or move faster if fps is slower on the buildings but no movement adjustment on the ship yet. Hoping to find more speedups yet !

Фото профиля RheoGamer
RheoGamer4 месяцев назад

@vagnoprog Cruz credo! 🫡

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

@vagnoprog Thanks my friend , thats what I say when I see your work !

Фото профиля RheoGamer
RheoGamer4 месяцев назад

@vagnoprog Isso tá muito rápido!

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

@vagnoprog Got the MC68000_BP_FTW SFX chip inside mate 👌

Фото профиля SunnyChowTheGuy | Wishlist in bio
SunnyChowTheGuy | Wishlist in bio4 месяцев назад

so smooth

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Thankyou 😀 Maximum performance has been the push as its critical for gameplay to have a reasonable frame rate.

Фото профиля Oscar
Oscar4 месяцев назад

Your work looks great. It’s amazing what you’re able to pull off. Here’s a model I made of the ship; it’s an accurate copy of the SNES one.

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Thanks I will have a look , I did get the current model obj file of a reputable site but not sure how accurate it is . Its 23 triangles iirc.

Фото профиля Nil Obermüller Schaupp 🇧🇷🇩🇪🇵🇹
Nil Obermüller Schaupp 🇧🇷🇩🇪🇵🇹4 месяцев назад

Incrível o quanto essa máquina tem poder para ser extraído quando se conhece bem.

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Its surprising yes , the packed pixel format helps as its close to chunky format , actually better for internal filling ( its 2 pixels per byte rather than 1 ) . Also the cpu can use 32 bit instructions to do the filling so 8 pixels updated in one instruction. So a few things help 😀 , we need all the help we can get though haha .

Фото профиля 𝘼𝙡𝙚𝙭𝙫𝙧𝙗
𝘼𝙡𝙚𝙭𝙫𝙧𝙗19 дней назад

Does the complexity of handling both quad and triangle rendering pay off by substantially increasing rendering speed in a mixed use case title (ala Star Fox) vs triangle only?

Фото профиля Shannon Birt
Shannon Birt18 дней назад

There can be a perfromance lift for larger objects that can be drawn with quads yes . Buildings are a good use case for sure. Quad have more overhead in setup vs triangles , but the benefit is in the line filling, they fill lines top to bottom in one single pass. As It takes two triangles to draw one quad, you fill lines top to bottom twice. Every time you finish one line and move to the next theres a bit of overhead in the dda adjustments etc. So the less lines drawn the better. Also on average per line you full only half the ojbect width so not as efficient as doing the full width , so theres setup cost in that also. Re quads Its difficult to code with speed in asm and take all the screen clipping into account though , a triangle rasterizer only would be much easier going . For a while I did draw everything in triangles for testing. For player ship and small objects the quad overhead is not worth it as the vertical height is not large enough , also the models require triangular detail so the player ship and likely most small enemies will be all triangles to simplify . Anything large enough thats 4 sided however is great for a quad .

Фото профиля Sega Genesis Official Fan
Sega Genesis Official Fan2 месяцев назад

It plays way smoother then the SNES star fox

Фото профиля Kathy Rayna 🦝🎮
Kathy Rayna 🦝🎮4 месяцев назад

I love everything about this so much... Amazing work, keep it up!

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Thanks 😀 Its been a bit of work but its suprised me what can be done .

Фото профиля Loaf
Loaf4 месяцев назад

Incredible!

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Thankyou 😀

Фото профиля pipolade
pipolade4 месяцев назад

Amazing, do you think Starfox at 25/30 fps is possible on the stock Megadrive ?

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Thanks 😀 not with full detail as the scenes can get busy , I think it can still be decent. An overclocked MD could get closer as ive heard 10 mhz 68k level is quite common on overclocked machines

Фото профиля pipolade
pipolade4 месяцев назад

I installed a 12 mhz quartz ten years ago in my Megadrive. Definitely improve a lot the performances, Super Hang On (JP version with unlocked framerate) is impressive with the overclock.

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

12 mhz.would fly , close to 50 percent faster than stock. I need to get mine done for testing . Thunderforce 4 would be great on oc also.

Фото профиля pipolade
pipolade4 месяцев назад

You can do some overclock with Regen Emulator if you want to see the difference before modifying your Megadrive. At 12 MHz, it can freeze after a while on my Megadrive. I would have to put a small heatsink with thermal paste.

Фото профиля robert james moss
robert james moss4 месяцев назад

now you have a handle on parodius is there any chance of the other gradius games, asking for a friend who doesn't like parodius.....

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Gradius 3 seems to have some technical challenges on arcade and snes , be nice to see if they can be solved on MD. Gradius 2 looks easier to tackle but still looks fun . Lots of options !!

Фото профиля robert james moss
robert james moss4 месяцев назад

Crysis ported next week then!

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Haha yes, Nanosuit engaged !

Фото профиля MelficeXD
MelficeXD4 месяцев назад

Good job! looks supperb! :D my fight is with a dumb deferred renderer currently! XDDD keep it up!

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Thabks :-) wish you luck, deferred rendering sounds like fun but too much cpu needed for it so its all at once here haha. I do wish I had enough cpu for a z buffer , and may do a coarse version of that yet to offset slow filtrate

Фото профиля MelficeXD
MelficeXD4 месяцев назад

As if you had memory to spare in megadrive😅

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

I could do a coarse one , its just if it would be good enough. Need to do something smarter than overdraw everything.

Фото профиля MelficeXD
MelficeXD4 месяцев назад

You could do tile based z-buffering, but that's overkill for a megadrive, also, there is not enough precision😅

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

It needs to be cheap as chips and accurate , so likely doesn't exist haha .

Фото профиля Guillaume NUNES
Guillaume NUNES4 месяцев назад

Your legend is growing ! Well done !!

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Thankyou ! I hadn't dabled in 3d before so its been interesting to learn !

Фото профиля Cledson Lopes
Cledson Lopes4 месяцев назад

Fantastic! It's very noticeable the "gameplay" is faster than before! Great work!

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Thanks 😀 Yes framerate is key , although im hoping that when the action gets busier I can do some tricks to keep the frame rate up.

Фото профиля Cledson Lopes
Cledson Lopes4 месяцев назад

I believe in you! Blast processing! Greettings from Brazil!

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Thanks and Yes ! Brazil , heart of the Mega - love from New Zealand !

Фото профиля Chev
Chev4 месяцев назад

Impressionante.

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Thanks Chev 😀

Фото профиля Yael Trejo
Yael Trejo4 месяцев назад

Brother Here's my other colleague Iris and fellow Skyerios member. She is impressed with your progress and advancements

Фото профиля Max Abramson
Max Abramson4 месяцев назад

All 68k code now?

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Mostly , vertex calculation for quads is in C still . All the shape drawing functions are in assembly. The C part all being in assembly might speed things up a little yet being converted to asm.

Фото профиля Max Abramson
Max Abramson4 месяцев назад

Almost three years of offering to rewrite other people's C code into 68k Assembly or even just to further optimize their C code or compiler flags. Either no response or people asking me to wait until the project is already finished, by which point rewriting code is more work.

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

The main issue is the algorithm, not what language its in , eg an inefficient algorithm in assembly will be slower than an optimal algorithm in C . Thats why is pays to prototype in C first , its faster to get the optimal logic then translate that to asm which is several times more verbose than C . Theres not much point converting an incomplete engine from c to asm as the c code may not even be slow or may not be the future bottleneck . Ideally convert the hotpath only to asm , leave rest in C . I think just Crack on with your own projects Max . look forward to seeing your efforts.

Фото профиля Max Abramson
Max Abramson4 месяцев назад

Finally, an area of disagreement. The theoretical ideal for performance is to map out all of the registers (A & D on CPU, plus the ports on the VDP, DMA, etc), then write the software engine using TTA/arrows, etc. At that point, I know how many cycles/byte and minim. overhead.

Фото профиля Shannon Birt
Shannon Birt4 месяцев назад

Always healthy to disagree in the pursuit of performance. There reason i think algorithm is more important than utilisation is its easy to keep the cpu , vdp / dma 100% utilised - you could do that and effectively do nothing usefull . So utilisation doesn't mean efficiency. A good algorithm will actually lead to less utilisation overall as you will end up idling/spinning until frame end as you finish the work earlier . You don't need to map out the hardware to know cycle counts and bus timings, thats well known, it can help you understand why some operations take more cycles sure but any cycles pluggin counter will give you with accuracy. No need to re-invent the wheel.

Фото профиля Max Abramson
Max Abramson4 месяцев назад

So, few programmers (and even AI) seem to understand algorithm at an optimal level. LUTs, for example, are fastest if they fit in a single ROM segment, output set to match the 16-bit data bus, using strides that can be calculated quickly using one of the 68000 Addressing Modes.

Фото профиля Albert Abramson
Albert Abramson2 месяцев назад

Some devs back in the day would include hundreds of triangle tiles in VRAM and use those to finish their objects.

Фото профиля Albert Abramson
Albert Abramson2 месяцев назад

I’d so love to work on this project! If I could just speed up the math operations…

Похожие видео

** 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

Shannon Birt

21,306 просмотров • 5 месяцев назад

** Sega Genesis 3D engine update 8.5 ** A smaller update - Scrolling left or right of the sprite based background is implemented along with X camera shifting of the 3d plane. The Exodus emulator has been used with sprite boxing enabled so you can see the background sprites making up the object ( their outlines ) and how they move to tilt the image . The background is made up of 112 sprites (51 are multiplexed in that number as the Genesis is limited to 80 without mulitplexing eg basically re-using sprite hardware as the screen is being drawn ) . In a 6 x 17 sprite grid of 16x32 pixel high sprites. If the tilt affect was not neccessary or only 1/2 the angle of tilt effect was needed, I could get away with 1/2 the number of sprites and just used 32x32 sprites instead. I think the tilt effect adds a bit to movement however. This is very similar to how a Neo Geo would build its backgrounds up - in 16 pixel strips however its sprites are tall as the screen or more but the concept of making backgrounds up in 16 pixel wide strips is similar. The NG uses sprites to build any background layers required. Here on the Genesis the reason is rendering is much faster using both the 3d planes and using a total sprite background for this engine. Initially i had a lot of things breaking when I tried to move the camera in the X dimension much , as i'd optimised the vertex transform path heavily and once beyond a certain camera offset the X value was wrapping around causing a lot of breakage in the rendering. Thankfully solved that issue without marginal impact to cpu . It still needs work , perspectives are a bit wrong etc but it won't be hard to fix. Also found some rendering speeds ups, about 8% by optimising fully onscreen quads and optimising the clearing of the frame buffers more efficiently. Toni Gálvez - Megastyle - BG. has been hard at work on HUD elements and more 3d models so will have something to show for that soon. #SGDK #SegaMegadrive #SegaGenesis

Shannon Birt

21,468 просмотров • 1 месяц назад

*** Mega Parodius Sega Megadrive Update *** Lately I've been having some fun seeing how far we can push the Parodius game engine . This is not arcade accurate - just for testing, decreased bullet timers and upped the bullet count to see what would happen re cpu usage when things are made a lot busier ! Maybe something like this could be insane mode in the options etc. Since last update we are a lot more optimised under the hood . The C based sprite engine, particularly visibility checking was speedup , overall 25 % faster. Then re-wrote the sprite engine completely in 68k assembly , 30% faster again. It took about 3 days and 1500 lines of assembly , thankfully the gains were worth it. All these gains will be back ported to S.O.T.A also as its using the same sprite engine. Usage is around 19% of cpu per frame with a full sprite load - 33 % cpu left in the busiest frame currently . Parodius is using a write the sprite list every frame type engine , so priority and meta-sprite objects can be handled with ease albiet its still a bit slower than static allocation sprite engines such as the one in lufthoheit but this is a bit easier to code for in the long run. All collision checks are been done , we are using a spatial grid system to get the collision checks done faster than a brute force approach . To get to maximum sprite count destruction is disabled in the video. We hit 80 sprites onscreen in this sequence , the sprite counter is one the Left side. We use about 16 sprites in the top hud and water line , about 21 for player attacks / missiles / shots / options . Up to 35 bullets + enemies . No lazer usage here as the Lazers use zero sprites thanks to the raster tricks , this video is all about the sprites ! Improved the water line when the Catboss is active , as he is Sprites + Forground we are doing some tile rotation tricks eg bit scrolling to give the impression of parrallax at that point . Vector Orbitex has updated the stage 1 music again and has made things even higher quality , hes mixed pcm and fm channels together to create higher quality orchestral hits for example . Pyron has started converting assets from stage 2/3 , some amazing work there . Hes well ahead of me at present which is a good thing. Still lots of incomplete animations missing logic etc , its slow going with RL getting in the way haha and 2 other projects !! Still its fun !! #SGDK #SegaMegadrive #SegaGenesis #Parodius

Shannon Birt

16,231 просмотров • 9 месяцев назад

** Sega Genesis 3D Engine Update 8 ** Significant improvements all round as you can see and hear from the last update !! Foremost - A huge thanks to Toni Gálvez - Megastyle - BG. who has joined the project to create a bit of 16bit low poly magic. Toni's an Amiga fan but also crazy about game dev in general, he's worked on GBC, GBA, PC, MD, PSP, C64, CPC, MSX... and others. Gaming titles include War Times, Metal Gear, Rocketman, Tintin & Asterix to name a few. He's provided the great new ship model you see on screen - new striped buildings, all the backgrounds / palettes etc. There's a lot of models he's given me which need to be added, also he will be planning a lot of the level design. Very happy to have him help me turn this into something more than a tech demo as I have my hands tied pushing the MD as far as it can go haha - there is no cpu cycle to be spared. Also many thanks to my good friend CYBERDEOUS - Crouzet Laurent for the Music for this showing , I wanted to have the music load occurring so we have a realistic benchmark for performance and he was only too obliging. If you're into MD chiptunes check him out !! Since last update : New player model , substantially more detailed than the Arwing. Last update had a 23 triangle Arwing , this update has a 39 triangle custom model from Toni. We had several to choose from , others will be used for enemies . 3D Buffer size increased 25% to 256x160. This was quite tricky as I'm close to the DMA limit even with an extended vblank . Spent a few days thinking of how to do this as like anything retro every solution has a drawback, finally got a workable solution. It makes a big difference to have a bit more vertical height . Z Rotation added ( the screen tilting left to right ) , small hit to vertex transform on cpu thanks to look up tables doing the heavy lifting, saving 4 multiplies per vertex. Multiple speed ups in rendering code. Onscreen paths with no range checking used until Z is close enough to cause clipping , partial onscreen drawing pathes that need to check boundaries, quad rendering completely rewritten - was very very painfull to get right . I found out the hard way that things are great when they are not rotating in the Z axis haha . Partial buffer draw optimisations - which have helped with the massive dma load , sending up to a 20kb buffer in a single frame needs a lot of optimisation. Min / Max tile lines are analysed and only sent if dirtied , reducing most buffer swaps substantially. Still some issues to sort out , at times you can see the flicker near top of screen when frames are near full height . I need to optimise that a bit. Due to the onscreen buffer system a full Sprite background had to be implemented almost Neo Geo style. This flips the usual MD rendering system on its head as it uses both foreground and background layers for a foreground 3d plane and sprites for the background. This presents a few issues, one is to get a tilt effect on the background by using narrow sprites (16x32) we run out of sprites when trying to cover the screen. Thankfully the MD is not limited to 80 sprites, to fix this a 114 sprite multiplexor is used to draw the background, its completely made up of 16x32 sprites ! Why do things this way ? speed . Its the interleaved foreground/background layers that allow a double buffered ram system writing to write to vram using dma in a completely linear fashion - virtually no tile translation needed. The negative is you have no planes for the background, that's where the sprites come in . Thanks to H40 mode we still have a few sprites we can use for effects in the forground also . Thankfully we can implement a fairly good tilt still for the background using sprites, in future updates this will be able to move horizontally also and a bit of vertical movement. XGM1 music driver in use to simulate music cpu load, XGM2 unfortunately with the massive DMA needed to shift the 3d buffers would slow down at times rendering it unusable, XGM1 plays at full speed - albiet with a bit more of a cpu hit. Together with the sprite multiplexor and the music driver active theres a 10 % hit to cpu so I've had to play around with draw distances / object heights and other optimisations to offset that. Not to mention the larger buffer takes more cpu to fill also. Everything is placeholder so will be changed with proper stage design. We are averaging 20 FPS in the current video, I'll push for more as always !! Progress continues on my other projects , updates soon on those - retirement can't come quick enough . #SGDK #SegaGenesis #SegaMegadrive

Shannon Birt

34,940 просмотров • 2 месяцев назад

** 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. Pyron pulled out all the stops and got me the source frames and reworked the BG tiles for this test - a big thankyou to him , Vector Orbitex 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

Shannon Birt

25,545 просмотров • 8 месяцев назад

** MEGA Parodius Scaling Effects Part 2 ** Well - this is the BIG one - literally !! Huge thanks to my team Pyron & Vector Orbitex 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

Shannon Birt

26,902 просмотров • 7 месяцев назад

*** Parodius Demo Update *** After seeing my good friend Pyron amazing Parodius artwork , I could not let that go to waste. Its a crying shame Konami's shooters did not make it to MD at the time , time to rectify that (in time). The video shows some of the progress so far. Stage 1 scrolling using the streaming scroller from lufthoheit to automatically manage the tile management for the scrolling rather than using different sets etc. Its great when I can grab bits of code and apply them to new projects, it speeds things up !! Lufthoheits new stage is coming along well also and has its first enemies in , hopefully show something of that soon. The VRAM view is to the right , we will have plenty of vram left for objects without resorting to much manual management it seems. ~ 1/2 vram left. It looks like the biggest challenge for this level is the Cat Ship mid boss - the end boss seems easier in comparison for a few reasons. I've analysed the way it was done on PCE and SNES and will come up with the best option for MD. More to come on that soon. At present we will target mainly assembly , so performance won't be an issue . I'm not sure we need a sprite multiplexor for > 80 sprites , but we will use one anyway just to not have regrets/changes later on and for the Hint color effects the multiplexor can do also. We have an A level musician volunteering also for those concerned about the audio side of things - it wont dissapoint I'm sure. As this is now my 3rd / 4th project it will be done as time permits so no gaurantees on timelines sorry - we are all hoping to do well by the community however. #SGDK #Konami #Parodius #MegaDrive #SegaGenesis

Shannon Birt

12,526 просмотров • 1 год назад