It is currently Mon Nov 18, 2019 1:14 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: PowerPak fun story
PostPosted: Fri Apr 22, 2011 4:54 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 4214
Location: A world gone mad
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.


Top
 Profile  
 
 Post subject: Re: PowerPak fun story
PostPosted: Fri Apr 22, 2011 8:36 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21697
Location: NE Indiana, USA (NTSC)
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?


Top
 Profile  
 
 Post subject: Re: PowerPak fun story
PostPosted: Fri Apr 22, 2011 8:55 am 
Offline
NESICIDE developer
User avatar

Joined: Mon Oct 13, 2008 7:55 pm
Posts: 1089
Location: Minneapolis, MN
tepples wrote:
Should I make a update tonight?


If you do would you mind if I update my test_roms repository with it?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 22, 2011 11:06 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21697
Location: NE Indiana, USA (NTSC)
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 218 times
Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 22, 2011 11:14 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 4231
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!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 22, 2011 11:27 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21697
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 23, 2011 6:37 am 
Offline
NESICIDE developer
User avatar

Joined: Mon Oct 13, 2008 7:55 pm
Posts: 1089
Location: Minneapolis, MN
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 23, 2011 10:09 am 
Image
Really awesome! Any other demos like that one?


Top
  
 
 Post subject:
PostPosted: Sat Apr 23, 2011 12:33 pm 
Offline
User avatar

Joined: Wed Oct 15, 2008 11:50 am
Posts: 943
I love the blue LED Socramm! Nice touch :wink:


Top
 Profile  
 
 Post subject: Well hully gee
PostPosted: Sun Apr 24, 2011 9:47 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21697
Location: NE Indiana, USA (NTSC)
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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 24, 2011 7:48 pm 
Offline

Joined: Sat Nov 17, 2007 8:44 pm
Posts: 385
All I keep hearing in that song is a few notes of this song over and over. :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 25, 2011 12:04 am 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1274
Speaking of Power Paks, I just ordered one. :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group