|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Author | Message |
---|---|
|
Fun with zooming
Posted: Sun Oct 30, 2005 5:40 pm
|
Since I can never get anything finished in time for the infamous Bock's Birthday event, I'm going through my directories of SMS stuff and looking for bits and pieces of programs other folks may want to check out.
Here's a program that does full screen zooming at 60 FPS on the SMS, using TMS9918 graphics mode I. It's all raster effects and precalculated data rather than number crunching: http://cgfm2.emuviews.com/zip/zoomex1.zip Some of the raster timing (NOP delay) will need to be tweaked for a PAL machine to hide visual garbage - it works fine on a NTSC SMS 1. I've included some technical details about how the effect works. Edit: works with Kega Fusion. What doesn't Kega do correctly? :) |
|
|
Posted: Sun Oct 30, 2005 6:27 pm |
Great stuff.
Interesting how you do raster effect on TMS9918 video mode using timed HALT. I haven't seen a single SG-1000/Coleco game doing that due to lack of line interrupts. It's not showing properly in MEKA since I'm rendering TMS9918 video modes on a screen basis rather than line-basis. Now this demo is a motivation to switch to line-based rendering, but it will take more CPU, causing a probable noticeable effect on older computers. ALL YOUR FAULT!! :) |
|
|
Posted: Sun Oct 30, 2005 7:09 pm |
It's mainly to minimalize display 'glitches' that show up when the VDP registers are changed. If the main loop was something like: loop: jr loop; Then the best case interrupt response time is right after the JR, and the worst case is where the JR has to finish executing first beforehand (12 T-states, I think). By using a bunch of HALTs, interrupts are serviced as quickly as possible. However I just realized the interrupt routine change the return address to the start of the HALT block, otherwise every 512 interrupts there's a bit of sync loss due to the JP being executed. Oops. Otherwise there wasn't any NOP delay that would hide all the garbage, all the time. So this is a good technique for keeping the display tidy.
I'll try to release some of my other TMS9918 based programs that require line rendering just to make MEKA more complete (or difficult to develop! ;) |
|
|
Posted: Sun Oct 30, 2005 7:57 pm |
Well, that is mightily impressive. I'm aiming to have something done for 25th November, and since I didn't do anything yet it might not be so great :)
One very pointless minor question: what did the COASTER sine table creation program do that WLA DX's .DBSIN couldn't? [Edit: looking closer, generating matching C and ASM tables would be one thing.] |
|
|
Posted: Sun Oct 30, 2005 10:18 pm |
Based on your track record for other SMS software, I think whatever is finished by then will be pretty good. :)
It has a GUI that allows you to edit several parameters and see resulting sine wave plotted in a little window. You can edit a second one and merge them together in different ways. I find it easier to observe the sine wave on the screen rather than try to guess what it will look like based on the input parameters WLA-DX accepts. And the plain text output is nice for using in C and assembly programs, as you mentioned. |
|
|
Posted: Tue Nov 01, 2005 5:05 pm |
WOW! That's an awesome effect. Can you only do this with the checkerboard pattern, or can you do this effect with something more complex? | |
|
Posted: Wed Nov 02, 2005 6:58 am |
You are pretty much limited to displaying something with intersecting straight lines. It would be cool to zoom up a bitmap or do other solid shapes like circles or triangles, but it just can't be done in hardware. You can do some minor tweaks to this effect, mainly in the coloring. For example: http://cgfm2.emuviews.com/zip/pt.zip The movement data is heavily distorted so you get a more interesting result, and four colors instead of two are used. Looks better on a real TV then in Kega. http://cgfm2.emuviews.com/zip/vras.zip Original effect but with vertical scrolling bars in the background. However because of the tile size (8 pixels across) and limited palette in the TMS9918 modes, it doesn't look that great due to the choppy movement. You could probably do horizontal bars in the foreground with smooth movement, but I think you'd run out of H-Blank time doing the color table updates per frame so I didn't try. |
|
|
Posted: Mon Jun 29, 2009 3:24 am |
urgh, an old post with dead links! :) i'd be interested to check this effect out, does anyone have it laying around still? | |