PowerPak fun story

You can talk about almost anything that you want to on this board.

Moderator: Moderators

Post Reply
User avatar
koitsu
Posts: 4218
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

PowerPak fun story

Post by koitsu » Fri Apr 22, 2011 4:54 am

I took today off since I had a molar removed (3rd and final one) and spent the day relaxing, sleeping, and spitting up lots of blood. So, I was awake at night; some friends of mine came over (had to pick up a prescription for Vicodin), etc. etc. and we got to talking about the NES. One of them noticed I had a PowerPak, so we spent some time taking turns playing Bionic Commando, as well as using the technician mode of my TV to adjust problems with it (H/V size were completely wrong, ditto with H-pos).

Eventually blargg's palette demo (copper bars-esque) got mentioned, as well as Tepples' sprite limitation (Sprite can) demo. We found 'em both and tried them out.

The palette demo is truly an amazing thing to witness on an actual console. It's very impressive on an emulator, but once you get it on an actual console (and mine is hooked up via RF to a 13" Sony Trinitron TV that has all sorts of dot alignment issues, so the picture is naturally shaky), it looks amazing. And Tepples' demo got me thinking (I really want to figure out how that thing works... :-) ).

Anyway, just sort of a nonsensical post from someone on a bit of Vicodin, wanting to share the enjoyment of the NES and how even in 2011 it can still be the centre of attention at small parties. A very interesting and fun way to spend ~3 hours with friends nonetheless.

tepples
Posts: 22054
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: PowerPak fun story

Post by tepples » Fri Apr 22, 2011 8:36 am

koitsu wrote:And Tepples' demo got me thinking (I really want to figure out how that thing works... :-) ).
If you're referring to the one that plays "Celestial Soda Pop" in the background, it's just a lot of OAM cycling and subpixel velocity. And it works poorly because it was written before the $2002.D7 race was figured out, but that's probably fixable with about three extra lines of code. Should I make a update tonight?

User avatar
cpow
NESICIDE developer
Posts: 1097
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Re: PowerPak fun story

Post by cpow » Fri Apr 22, 2011 8:55 am

tepples wrote:Should I make a update tonight?
If you do would you mind if I update my test_roms repository with it?

tepples
Posts: 22054
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Fri Apr 22, 2011 11:06 pm

The change turned out to be a lot more than three lines of code because I got inspired to do all this:
  • Ported from DOS-based X816 assembler to cross-platform ca65
  • Switched from NerdTracker II to LJ65's far smaller music engine; PRG now under 4 KiB
  • Automatic detection of NTSC, PAL, or Dendy mode; music compensates
  • Vblank waiting changed from race-prone PPUSTATUS spin to waiting for NMI count to change
  • General removal of cargo-cult code from early NES homebrew days
  • Switched from O(n^2) exact gnome sort to O(n) eventual bubble sort for less slowdown when adding cans
  • Some build tools ported from C to Python
  • Pseudo-insular font replaced with standard lowercase
  • Tested on PowerPak
As promised, here's a new ROM for cpow's repo:
Sprite Cans 2011
Attachments
spritecans-2011.zip
(30.3 KiB) Downloaded 291 times

User avatar
Dwedit
Posts: 4354
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit » Fri Apr 22, 2011 11:14 pm

So what was the "cargo cult" code?
And what is the sorting done for?
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

tepples
Posts: 22054
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Fri Apr 22, 2011 11:27 pm

Dwedit wrote:So what was the "cargo cult" code?
The sort of crap that one finds in deprecated tutorials and beginner code:
  • Vestigial development code that never got called in the final product (puts, puthex, controller reading)
  • Various sorts of clearing RAM "just in case"
  • "Wait for end of vblank" that only ever worked as intended on NESticle and was effectively a no-op on NES
  • Resetting scroll with $2006
  • Unnecessary pushing and pulling of registers that the NMI handler doesn't even modify
Dwedit wrote:And what is the sorting done for?
I think it was to break up clusters, so that the OAM cycling is less likely to put overlapping sprites in front during the same frame. And during early development, I was originally going to have the cans bounce off each other, but I abandoned that. This sort of sorting is one of the ways to speed up collision detection.

User avatar
cpow
NESICIDE developer
Posts: 1097
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Post by cpow » Sat Apr 23, 2011 6:37 am

tepples wrote:As promised, here's a new ROM for cpow's repo:
Sprite Cans 2011
Nice work, tepples! This demo has one of my favorite tunes that I've been humming to myself ever since I first downloaded it a few years back!

Hah, I remember even thinking to myself "I wonder who Damian Yerrick is..."

Actually, this demo was one of the ones I used to check my 8x16 sprite handling.

I've put it here.

socram8888

Post by socram8888 » Sat Apr 23, 2011 10:09 am

Image
Really awesome! Any other demos like that one?

User avatar
qbradq
Posts: 951
Joined: Wed Oct 15, 2008 11:50 am

Post by qbradq » Sat Apr 23, 2011 12:33 pm

I love the blue LED Socramm! Nice touch :wink:

tepples
Posts: 22054
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Well hully gee

Post by tepples » Sun Apr 24, 2011 9:47 am

socram8888 wrote:[img]Image[/img]
Really awesome! Any other demos like that one?

If that's Hogan's Alley, then where's the Yellow Kid?

It appears someone wants to reenact this intro in real life:
http://www.peopleofwalmart.com/?p=30342

UncleSporky
Posts: 385
Joined: Sat Nov 17, 2007 8:44 pm

Post by UncleSporky » Sun Apr 24, 2011 7:48 pm

All I keep hearing in that song is a few notes of this song over and over. :)

Drag
Posts: 1323
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Post by Drag » Mon Apr 25, 2011 12:04 am

Speaking of Power Paks, I just ordered one. :D

Post Reply