Tempest is possible

Use this forum to share and discuss Uzebox games and demos.
CunningFellow
Posts: 1488
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Tempest is possible

Post by CunningFellow »

Here is the complete TimerOverflow Render routine.

It doesn't play a game or anything, just draws coloured stripes on the screen. It is just a proof of concept for the final idea to get the 256x224 x5 colour video mode working.

The Emulator does not quite get the last pixel correct. It should be medium red rather than a 2 pixel wide bright red. I have checked it in the AVR simulator and the code does get the colour change spot on at 5 clock cycles.
Attachments
TempestTestCode.zip
(50.1 KiB) Downloaded 411 times
User avatar
uze6666
Site Admin
Posts: 4823
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Tempest is possible

Post by uze6666 »

CunningFellow wrote:Whats is this about in mode6.s
uze_audio_out_q.png
And can I use those 213 cycles or are they used some other way for audio mixing?
Depends on the mixer type. That the number of cycles used by the audio mixer during each scanlines. For the inline mixer, not really, but for the vsync mixer you have some cycles that are usable (but less ram).

Code: Select all

#if SOUND_MIXER == MIXER_TYPE_INLINE
                #define AUDIO_OUT_HSYNC_CYCLES 212
                #define AUDIO_OUT_VSYNC_CYCLES 212
        #else
                #define AUDIO_OUT_HSYNC_CYCLES 135
                #define AUDIO_OUT_VSYNC_CYCLES 68

        #endif
CunningFellow
Posts: 1488
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Tempest is possible

Post by CunningFellow »

oh well - I will leave enough cycles for the inline mixer then.

I was just looking for some free clocks to clear the VRAM during render to save time. If it is going to be borrowing from Peter to pay Paul then I won't do it.

I currently have about 230 free clocks per scanline. Going about it a naive way clearing vram and ramtiles will take 256 clock cycles.

I will have to think up some more tricky things I guess.


I now have a speadsheet that can type the 8K lines of ASM code that the pixel render loop needs. (Could not think of an sensible way to use a macro)
User avatar
uze6666
Site Admin
Posts: 4823
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Tempest is possible

Post by uze6666 »

There's a way to recover some 43 cycles from the inline mixer if you don't need the pcm channel (channel 5). I'm not aware of a game that used it so far. I could add a conditional build switch to remove/disable it, like what was done for the vsync mixer. Let me know if you think it is worth it.
User avatar
Flecko
Posts: 158
Joined: Mon Jan 05, 2009 11:50 pm

Re: Tempest is possible

Post by Flecko »

I always like having switches to turn things off in the kernel ;P

After I wrote my custom font routines...I couldn't help but wonder if that would come back to bite me in the butt later when it comes to Flash space. Taking things out is nice, but I understand how much maintaining the kernel must take of your free time Uze.

Here's a +1 for a Makefile switch though.
CunningFellow
Posts: 1488
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Tempest is possible

Post by CunningFellow »

Now that I am fully confident in the 256x224x5bpp video mode for Tempest HOW do we hook up a spinner ?

Do we make something that reads a quadrature and shifts that out an SPI port so the normal NES joystick reading routines can get a delta-spin ?
User avatar
uze6666
Site Admin
Posts: 4823
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Tempest is possible

Post by uze6666 »

A spinner controller you mean? One could be made to use the regular SNES port for sure. That would offer a better experience (and I could use it for Arkanoid!). But hopefully you'd support the regular controller too!
CunningFellow
Posts: 1488
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Tempest is possible

Post by CunningFellow »

Of course. Backward compatible with left/right/fire.

I think it will be easiest if just make the spinner use an AT-Tiny-something to go between quadrature and SPI than try do it with 4000/7400
User avatar
uze6666
Site Admin
Posts: 4823
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Tempest is possible

Post by uze6666 »

Totally agree, there's plenty of solutions on the net that uses some Attiny and basic rotary encoders. Never worked with rotary encoders, but if you or I want to work out a simple design with through hole parts, I'll make a PCB and kit for it. I have a ton of SNES controller cords waiting for such a use. 8-)
CunningFellow
Posts: 1488
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Tempest is possible

Post by CunningFellow »

I will knock something up with an ATTiny in an 8 pin package.

That way if people like myself think DIP is too hard, they can choose the SO package :)

I guess I will pull apart an old mechanical-optical mouse for the guts.
Post Reply