Jump to content

21fx - an example through emulation of what SNES was capable of


Level 99
 Share

Recommended Posts

I just found this to be absolutely fascinating. If anyone's been around this big-ol' internet of ours, and they're gamers, they've no-doubt heard of the word "emulation". In regards to emulation, over the years it's gone through the process of 1) prove it's possible 2) make it playable 3) make it accurate/enhance it. bsnes is an SNES emulator that does have a high focus on accurate emulation. With the latest release, 0.58, there has been the inclusion of support for something called 21fx. The full story is here:

http://byuu.org/21fx/

Long story short: consider it like the SNES-CD. It expands the accessible ROM range from 4mb to 4GB. There's a demo of the Lunar video running on bsnes and...I'm actually stunned. I'm even more stunned that he's trying to pursue it actually being made into a hardware attachment that could technically work on a real SNES. Just figured y'all would find this an interesting read.

Link to comment
Share on other sites

Doesn't hardware expansions kind of defeat the very point of what a console is capable of?

It never really has in my mind. Done correctly, it does add to a system's effective lifecycle and provides more of a chance of competing with future systems to a certain extent. I'll make a blasphemous analogy: it's similar to how computers can remain on top by simply adding or switching out a single component. If the hardware at the time of the console's original design had known limitations that they could leave an "open road for improvement" by designing hardware add-on interfaces for future technology, then why not do that and if/when the next technology becomes available implement it?

I agree that this would have completely blown my mind back in the day. I do take caveats that this is software implementation on software emulation, but it's all the less-far-fetched because of the goals and purpose of that specific emulator: accurate hardware emulation. The big negatives would be the fact that the SNES as original hardware, complete with the expansion slot, is no longer being manufactured, and that as good as it may be, I really only see this as a hobbyist endeavor. Heh, despite that, I can't help having the hope that someone would start a project like Beats of Rage with the SNES hardware and use the 21fx expansion in very clever ways. It could give some new life to the SNES homebrew scene, and he does make a valid point that with software-implementation alone, it provides a portable platform for software design that has solid roots in one of the most successful gaming systems to date.

I ask you this: would anyone be opposed to having an original Chrono Trigger that also had the playstation cutscenes? I know the DS version provided that already, but it's a neat concept to go back to the originals and possibly expand upon them with patches (if that's technically possible to do with the 21fx, using it as an extension module. Example: have original Chrono Trigger game or rom, have patch and 21fx expansion-thingy for it, patch tells chrono trigger to expand to 21fx memory and access cutscenes when indicated). I'll fully admit that I haven't the faintest idea of the how or what, but just seeing that demo is filling my head with ideas.

Link to comment
Share on other sites

Doesn't hardware expansions kind of defeat the very point of what a console is capable of?

That's what I was thinking. I mean, if you're going to add bits to the console, surely you might as well just shove the components of a high-end gaming PC in there and say "Look! Now my SNES can play Crysis!"

snespcmod1.png

Link to comment
Share on other sites

Of course anything's possible when you bump up the memory. You can do more with a 32Mb cart than you could with a 4Mb one, so it's not shocking that 4GB would yield bigger and better results. More memory equals more color (had to be fickle with color usage and re-usage back in the day to conserve space), better music samples, greater capacity for more individualized graphics (fewer tile sets needed to save space)... all that stuff. The Genesis would also yield impressive results if you crammed 4GB of data into a cart. Hell, the original GameBoy likely would as well.

Nothing new or surprising in any of this IMHO.

Link to comment
Share on other sites

Instead they spawned their greatest competitor and then the greatest joke gaming has ever known.
...

The Virtual Boy? Because I know you ain't talkin' about our little N64. That dude be true blue coo'' date=' bitches. OoT for life![/quote']

I believe he is referring to the CD-I.

you see when nintendo was originally looking for an disc expansion for the SNES they turned to Sony who worked up the "play station" disc drive which was to be an attachment for the snes while simultaneously having one developed by Philips as well.

Long story short nintendo went with Philips(BIG MISTAKE).

The CD-I was a disaster with awful games like the

and

So Sony instead of scrapping the idea they went on to make the PlayStation(no space)

and well as they say the rest is history.

Link to comment
Share on other sites

Re: Java sucks, just a friendly joke, I wasn't expecting people outside my forums to read that page. I could share my dislikes of Java (and they are many), but it's off-topic and I ultimately don't care whether one uses it or not.

Doesn't hardware expansions kind of defeat the very point of what a console is capable of?
Yes and no, but that didn't stop Nintendo.

Star Fox, Super Mario World 2: Yoshi's Island, DOOM, etc used a 21MHz RISC coprocessor that was placed inside the cartridge. This is effectively 8-10x more powerful than the SNES processor was, and has specialized rasterization capabilities.

Super Mario RPG, Kirby's Dreamland 3, Kirby Super Star, Dragonball Z: Over 9000 Dimension, etc used a 10.5MHz version of the SNES CPU with about two dozen extended hardware capabilities inside its cartridge.

Pilotwings, Super Mario Kart, etc used a DSP that performed higher-end trigonometry and calculus functions, whereas the SNES CPU core is not even capable of multiplying or dividing.

Star Ocean and Far East of Eden Zero used memory mappers that let you access more ROM than a standard cartridge could hold, and also provided hardware decompression.

The Super Game Boy put an entire Game Boy inside a cartridge, and the BS-X added satellite linkup and download capabilities, as well as a read-write flash cartridge connector slot. Both streamed audio quality well above that of CD music.

Was the use of any of these chips considered to defeat the point of using an SNES back in their day? Did anyone complain that it wasn't the same anymore? They were selling points back then.

Every* system that has carts has done this: the NES had mappers, custom sound chips, even video RAM expansion. The Genesis had the SVP to draw polygons. The Game Boy put real-time clocks inside the games. The Nintendo DS even manages to pack specialized hardware in those little tiny flash cards. It's only impossible to add custom chips to CD-based media, for reasons that should be blindingly obvious. (* don't be Captain Obvious, I don't mean literally every last one in the entire universe.)

That's what I was thinking. I mean, if you're going to add bits to the console, surely you might as well just shove the components of a high-end gaming PC in there and say "Look! Now my SNES can play Crysis!"
There's a huge difference between utilizing what real hardware could do and making shit up.

What I have done was nothing that real hardware did not do. I have just combined part of the functionality of two devices into one: the S-DD1 mapper and BS-X audio+flash connector.

I did not add 1080p output, H.264 decoding, a 3D graphics accelerator, etc that could never happen on real hardware. That would be pointless and stupid, you are right.

21fx will be a real hardware device, and it will be for sale. I am capable of making the hardware, and I will. It's just a matter of time. 21fx's software implementation is to encourage interest and try and get others to help make it happen quicker.

I am taking advantage of the capabilities the SNES provided, like many popular games of the time did. Only I'm also taking advantage of the fact that storage is much cheaper now than in 1992.

Cost is also important. This device will cost about $20 in parts, and will work on the real thing with no external power source. It can also be added to any emulator in about 20 minutes, as the C source implementation is less than 4 kilobytes. It also won't cause any extra CPU usage to emulate. Compare that to sticking an Intel Atom with H.264 decode that would require several megabytes of source code and make the SNES emulator ten times more resource intensive.

Of course anything's possible when you bump up the memory.
Not true. I have the storage space for 1080p video, but the SNES' internal video circuitry is only capable of moving 2.68MB worth of data to video RAM per second, and it cannot transfer at all while drawing the screen. So cut that in half. We are limited to ~224x144@30fps on NTSC, or ~240x160@25fps on PAL.
Nothing new or surprising in any of this IMHO.
Correct. This is not revolutionary by any means. It's just a neat little thing for hobbyists to tinker with, and maybe enhance their favorite games a little if they like.

Personally, I think it'd be really cool to use some of the awesome remix songs on this site in existing games and let the user swap them out as desired. Enhance the playability of a classic just a little for a slightly new experience.

Link to comment
Share on other sites

I know about the plethora of expansion chips for the SNES. In the end I'm not a fan of them (though I can understand developers' frustration at the time with the lackluster native CPU. AFAIK this was because Nintendo initially planned backwards-compability for NES but scrapped the idea after the specs had been locked). Mainly because it jacked up the prices for the games themselves at that time, but also because I enjoy the craftmanship aspect of just making the most of what you have. I love watching tech demos for old computers and the coders constantly outdoing eachother with all kinds of crazy shit that's "not possible" on the hardware.

The MD/Genesis took the dedicated add-on route (save for some real rare cases like Virtua Racing), but thankfully none of them ever really reached a "must-have" status and the most impressive titles remained on the native hardware. On the SNES such titles are harder to find due to the widespread adoption of these chips which feels a bit like "cheating" in my mind.

Link to comment
Share on other sites

Not true. I have the storage space for 1080p video, but the SNES' internal video circuitry is only capable of moving 2.68MB worth of data to video RAM per second, and it cannot transfer at all while drawing the screen. So cut that in half. We are limited to ~224x144@30fps on NTSC, or ~240x160@25fps on PAL.

I didn't mean anything anything :-P

There are undoubtedly hardware limitations. You couldn't get the SNES to do Resident Evil 2 (the BGs and music would probably be all right though) or Spyro the Dragon just by adding more storage space. I was just pointing out that 4GB of data can allow a hell of a lot more to be done than 32Mb of data (4MB for those keeping score)... including real FMV, better than Neo-Geo quality music sample-wise (hell, just sample the CD audio really), more on-screen colors, etc. I just forgot to add the line "(within the hardware specs)" after "anything", that's all.

Link to comment
Share on other sites

O_O did byuu sign up for our forums and respond to those arguments? Holy-er crap!

The more I think about it, the more merit I can see some of these implications having in terms of usage. Were it possible to swap out music say for the original SSF2T on SNES with Blood on the Asphalt, or add in cut-scenes in places, it could really give some fresh pop to old classics.

Good luck with that hardware design, byuu. The stuff you said cleared up a lot of questions I would've had.

Oh, and I would totally replay FFIV with the EOBLOR arrangement album in there were it possible on the SNES. Spoony Bards, indeed!

Link to comment
Share on other sites

but also because I enjoy the craftmanship aspect of just making the most of what you have
I agree. They're also a huge pain to emulate.

May I direct you here? http://nesdev.parodius.com/bbs/viewtopic.php?t=5767

smkdan did exactly that and showed the limits of what the original hardware could do. He used Mode 7 to play back video at 64x64 resolution (yes you read that right), and it actually works pretty good. Limited to about two minutes due to storage space, of course. One of the videos is the entire cartoon intro to Teenage Mutant Ninja Turtles.

I didn't mean anything anything
Geez, I've nitpicked exactly as I've asked others not to, and didn't even realize it. My apologies.
I say go for it. I'll buy one.
Certainly if you want. I'll be selling at-cost or at a loss, and I won't take pre-orders. But otherwise I'll let you know. You will of course need a flash cart to use it, but I'm hoping to convince some flash cart devs to include 21fx support for an all-in-one solution. Keeping it simple for now so that I can make it happen.
it could really give some fresh pop to old classics.
Especially if people think outside the box of just adding PSX port video and audio. Totally redesign audio, store much higher quality sound effects on the S-SMP, add new videos hand-chosen from anime adaptations of games, add voice acting, make games like that CT: Prophet's Guile hack that is many times longer thanks to extra storage, etc. Could be really neat, we just need ROM hackers who are willing to try.

And by being a passthru (think of a Game Genie), it'll work with anything, so you could combine this with a SuperFX if you were crazy enough in the head.

The stuff you said cleared up a lot of questions I would've had.
Likewise I appreciate the interest and questions. I figured most would immediately reject the idea entirely. Not that I care, everyone's entitled to their opinions.

Just don't want anyone to think this device is my magnum opus. It's not, it's a side project I am working on for entertainment.

I spend 98% of my time focusing only on the hardware accuracy. It's nice to take a break and focus on making the games more enjoyable for once.

-----

Lastly, in case there are any ROM hackers here. This is what it takes to add full CD-quality audio to Der Langrisser via 21fx, with full sound effects still in place.

org $36822b; jml hook; nop

org $408000
hook:
sep #$20
cmp #$02; beq .play
cmp #$04; beq .stop

.unrecognized_command:
//eg sound effect, etc -- let the original game handle it
php; phb; phd
sep #$20
jml $368230

.play:
tya; sta $0021f1
lda #$01; sta $0021f0
-; lda $0021f0; bvs -
lda #$01; sta $0021f1
lda #$03; sta $0021f0
rtl

.stop:
lda #$02; sta $0021f1
lda #$03; sta $0021f0
rtl

That took about an hour to make. The CT demo took half a day. So overall, quite easy for a hacker to do, and I'll do a bunch of games myself. But we'll need the help of others to really make this a success.

Link to comment
Share on other sites

It never really has in my mind. Done correctly, it does add to a system's effective lifecycle and provides more of a chance of competing with future systems to a certain extent. I'll make a blasphemous analogy: it's similar to how computers can remain on top by simply adding or switching out a single component. If the hardware at the time of the console's original design had known limitations that they could leave an "open road for improvement" by designing hardware add-on interfaces for future technology, then why not do that and if/when the next technology becomes available implement it?

+ more

The reason why some companies don't max out on their abilities is because they know that the buyers will settle for less. Wii could have been released during the Lamecube phase; PlayStation was being worked on during the NES/SNES time, but just imagine if they released it then with its shitty graphics.

I'm sure that there are systems that are out there where you can control with your mind but if they're put out now, the demand of gamers will be TOO HIGH and they'd rather you chase their fad-for-fad... fads for their sake: they're getting the bang for your BUCK, baby!

Also, it's kinda hard.

org $36822b; jml hook; nop

org $408000
hook:
sep #$20
cmp #$02; beq .play
cmp #$04; beq .stop

.unrecognized_command:
//eg sound effect, etc -- let the original game handle it
php; phb; phd
sep #$20
jml $368230

.play:
tya; sta $0021f1
lda #$01; sta $0021f0
-; lda $0021f0; bvs -
lda #$01; sta $0021f1
lda #$03; sta $0021f0
rtl

.stop:
lda #$02; sta $0021f1
lda #$03; sta $0021f0
rtl

THAT'S IT!?

Well, I was in only one Programming class and failed because I wasn't paying attention so I'll redo it and whatever but for the most part it was easy and only required concentration but I wasn't concentrating because it's hard to concentrate because I have ADD but meh, anyway ,yes... that command isn't too complicated. Any time something has already been done it's easier to do than if you're trying to force innovation. That innovation is respectable.

Link to comment
Share on other sites

Byuu, Have you received any bids for the prototype yet?

Unfortunately not. neviksti stated his flash cart cost about $650 for two pre-populated prototype boards, so I hope to pay that or less, but I'd entertain any offers.

THAT'S IT!?

Yep :)

The SNES audio system has its own CPU, so games write custom programs. They send commands to the SMP to play certain songs. So all you need to do is trace mask opcodes right before a song starts, find what CPU command was sent, block it and use the track# it was trying to play to index into 21fx's audio track list.

Video is different, you have to stream data from DMA and set up an HDMA channel or IRQ to turn the screen on and off mid-frame. It's about five times as much code, but the same video player can be reused verbatim in any game.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...