Making NES Kung-Fu
-
- Posts: 1488
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: Making NES Kung-Fu
So anyways.
Interrupt driven EOL (end of line) saves 2 clocks per tile (DEC & BRNE)
Aligned sections for RAM/ROM tiles saves 1 clock per tile
Thinking I can sneek it in 6 clocks. 240 pixel wide viewport/window with a 32byte/256pixel wide buffer
Renderline: is looking like it will take 4K+ of flash. But seeing as ROMTiles are 0.5*flash usage it should be OK.
Leave it with me for 5 or 6 hours to make sure.
Interrupt driven EOL (end of line) saves 2 clocks per tile (DEC & BRNE)
Aligned sections for RAM/ROM tiles saves 1 clock per tile
Thinking I can sneek it in 6 clocks. 240 pixel wide viewport/window with a 32byte/256pixel wide buffer
Renderline: is looking like it will take 4K+ of flash. But seeing as ROMTiles are 0.5*flash usage it should be OK.
Leave it with me for 5 or 6 hours to make sure.
Re: Making NES Kung-Fu
I have to dig back into that complicated code but your suggestion is feasible. I have created a new compile time switch "VRAM_RESTORE_BUFFER" and created a branch in svn to test changes we will make to video mode 3. Perhaps we'll eventually find that a custom mode is required but let see first if we can leverage what we have.D3thAdd3r wrote:It would be nice to have a compile time option to eliminate ram_tiles_restore, obviously trivial to implement. A lot of games can easily redraw the entire screen making it unnecessary and it gets us 1.5-2 ram tiles back. We should easily be able to redraw that blue background, the only place sprites ever go and we have to draw over Thomas' old tiles from last frame anyhow.
New branch in google code, I'll commit all stuff there. You can checkout that branch and point your makefile kernel to that dir.
https://code.google.com/p/uzebox/source ... new-vmode3
Code: Select all
KERNEL_DIR = ../../../../branch-kernel-new-vmode3
...
KERNEL_OPTIONS += -DVRAM_RESTORE_BUFFER=0
...
Were ain't going anywhere!Leave it with me for 5 or 6 hours to make sure.
- nicksen782
- Posts: 714
- Joined: Wed Feb 01, 2012 8:23 pm
- Location: Detroit, United States
- Contact:
Re: Making NES Kung-Fu
I actually started a Flappy Bird clone. I can help by covering the creation process. Getting the graphics correct enough was the first challenge. I'm not sure how to do scrolling in mode 3. Maybe it could be mode 2? I dunno but I have a flapping and poorly flapping bird now. I'm thinking only move the bird up and down and then just scroll the pipes. Or maybe some kind of background tile trick. The tiles are small.
Competition entry? Lol.
Competition entry? Lol.
Re: Making NES Kung-Fu
Definitely!nicksen782 wrote:Competition entry?
-
- Posts: 1488
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: Making NES Kung-Fu
mmm - not great news.
My first attempt actually used 40K of flash for the renderline state machine.
Back to drawing board.
At least it shows it CAN be done.
I still have a few more ideas to reduce the flash usage.
My first attempt actually used 40K of flash for the renderline state machine.
Back to drawing board.
At least it shows it CAN be done.
I still have a few more ideas to reduce the flash usage.
- nicksen782
- Posts: 714
- Joined: Wed Feb 01, 2012 8:23 pm
- Location: Detroit, United States
- Contact:
Re: Making NES Kung-Fu
Why so much? This whole thread is pretty darn informative. Keep it nerds. Lovin' it. Also, how do multiple screen sections work in mode 3 with scrolling?
Re: Making NES Kung-Fu
I think up to 20K-25K I would consider a fair tradeoff. Still think it can be pulled off though. I was looking at the latest c64 demos at I still can't believe they are finding new tricks for it. 32 years later.At least it shows it CAN be done.
Re: Making NES Kung-Fu
Currently mode 3 does not support multiple scrolling sections. Only a main section that can scroll arbitrary and an optional overlay that is fixed. The overlay is always at the top and can have an arbitrary height. It can not scroll but can have it's own tileset independently of the main section. Check out the SuperMarioDemo for scrolling and overlay usage in mode 3. Be sure to read the wiki mode 3 article to decipher how it actually works. Not for the feint of hearth!nicksen782 wrote:Why so much? This whole thread is pretty darn informative. Keep it nerds. Lovin' it. Also, how do multiple screen sections work in mode 3 with scrolling?
Anyhow, I'm looking into adding multiple scroll section to mode 3 with some restrictions. More explanations on that soon.
-
- Posts: 1488
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: Making NES Kung-Fu
Nicksen, The way I did it was to make a big code table that was jumped around like a state machine.nicksen782 wrote:Why so much? This whole thread is pretty darn informative. Keep it nerds. Lovin' it. Also, how do multiple screen sections work in mode 3 with scrolling?
Look in the tempest thread for a description of how that works.
I didn't think it was going to be as bad as tempest, but it actually worked out even worse on the first attempt.
My current attempt looks like it is coming in at 24K but I don't know yet if I will blow the 48 clock budget.
There is still plenty of tactics left including dropping down to 3 bits per pixel (8 colours) but that does make the blitting maths harder.
-
- Posts: 1488
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: Making NES Kung-Fu
24k byte version works on paper.
I am going to try some other combinations during the week to see if I can get it down to a bit less.
Note - this does not mean I will have a new video mode any time real quick. All I have done so far is prove (I think) it is possible in a spreadsheet.
From the point where I proved tempest mode was possible in a spreadsheet to the point where I had coloured lines bouncing around the screen was several weeks.
I am going to try some other combinations during the week to see if I can get it down to a bit less.
Note - this does not mean I will have a new video mode any time real quick. All I have done so far is prove (I think) it is possible in a spreadsheet.
From the point where I proved tempest mode was possible in a spreadsheet to the point where I had coloured lines bouncing around the screen was several weeks.