FDS on PowerPak

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

User avatar
loopy
Posts: 403
Joined: Sun Sep 19, 2004 10:52 pm
Location: UT

Post by loopy »

Fx3 wrote:I would be interested about the "logic" emulating the $4xxx registers. What about the BIOS?
I added a register at $4027 for choosing the disk side. Reading and writing was a little tricky. PowerPak's FPGA does not control A0-A12 of its PRG RAM, so it's not possible to map any arbitrary byte to the disk read port ($4031). A proper address needs to be requested by the NES. I handle this by patching a load instruction in the BIOS, replacing the address with the current disk pointer. Thus,

$F4EF: LDA $4031 ;read byte from disk

PowerPak changes this to LDA $XXXX (E000-FFFF), maps part of the disk to the BIOS area on the next read, and increments the disk pointer. Writing works similarly. Of course, this isn't the only way to do it, maybe I made it too complex :P You could simplify the FPGA logic and write more BIOS code instead.

The BIOS was not modified much. I added the disk switching, and removed disk interrupts and some delay code, which aren't needed anymore. Real saving to CF will need to be done as BMF54123 wrote above.
ccovell
Posts: 1041
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Post by ccovell »

So, the new PowerPak mapper update includes FDS and NSF files, but I seem to be having far more trouble making games load than with your older FDS->NES file converter. For example, Konami games keep resetting to the FDS BIOS screen rather than loading up as before, and Zelda gives Errors 5 and 21 repeatedly.

Granted, I'm using a Boot Rom v.1.0 PowerPak; is the reason for this incompatibility solely from the different boot ROM version? In other words, exactly what does the new FDS mapper require in the newer Boot ROM?

I think it's better if you not remove older FDS converters from your site, as we can't all get the ROM in our PowerPaks updated in as timely a manner as we'd like.

(Oh, the NSF player looks and works great, but still doesn't recognize the buttons on Famicom expansion joypads...)
User avatar
loopy
Posts: 403
Joined: Sun Sep 19, 2004 10:52 pm
Location: UT

Post by loopy »

Hmm, I don't have any of those problems. I also have boot rom v.1.00. There weren't any big changes between mappers. Disks were moved to the upper half of ram, could it be a ram fault?

I put the old converter back, and fixed FDS and NSFs to read expansion joypads.
ccovell
Posts: 1041
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Post by ccovell »

One thing that I noticed from the early versions of your FDS converter was that in some games, graphics loaded up glitchy, alongside the games that would reset randomly or have checksum errors, etc. One thing I suspected was a dirty/unreliable data connection, since data is being copied from the cart to the PPU/CPU, and back to RAM on the cart. So adaptors, and noise on the data lines can screw up the process in many points along the way. But should it be this bad? Just to check, during "BIOS" loading, are all interrupts masked and the PPU turned off? That's the only thing I could imagine screwing up all these data transfers. Or else perhaps other errors when loading the FDS image into RAM/moving it around on the PowerPak.

Any ideas why I would be getting a constant loop of "Set side B / Error 21"s? And had you considered a different way of changing disk sides, such as getting the user to press buttons in combination on controller 2, or something like that?

I'll try to clean the contacts on my cartridge and adaptor in the meantime. :lol:
User avatar
loopy
Posts: 403
Joined: Sun Sep 19, 2004 10:52 pm
Location: UT

Post by loopy »

Now with audio!

I tried to match the output level with VRC6. Let me know if anything sounds "off".
ccovell wrote:Any ideas why I would be getting a constant loop of "Set side B / Error 21"s?
I changed the ram access timing to get it working better on my PowerPak. Maybe this fixes your problem as well.
Last edited by loopy on Mon Jan 12, 2009 9:33 pm, edited 1 time in total.
User avatar
MottZilla
Posts: 2835
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla »

Well I'll give it a try but I don't know if I'll be able to tell unless it's waaay off. I'm also wondering what games would be best at using the sound channel extensively.
Great Hierophant
Posts: 777
Joined: Tue Nov 23, 2004 9:35 pm

Post by Great Hierophant »

I am pleased to say that the FDS mapper works with boot rom 1.00 and most games I tried. I tried Zelda 1 & 2, Super Mario 1 & 2, Castlevania, Galaga, Kid Icarus, Jackal, and Zanac. I got partial success with Mario Bros and Metroid would not load a game or would be unplayable.
Bananmos
Posts: 551
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Post by Bananmos »

Yay! Finally I get to play FDS games with sound on my Powerpak! :P

But as awesome as this feels, I can't help feeling sad that the automatic disk switching just won't allow me to watch the intro to games like Zelda and Doki Doki Panic, which only show the intro until you change the disk side. Would it be possible to workaround this in some practical way, or is hacking the FDS file itself the only viable option?
User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Post by kyuusaku »

If the console polls the controller continuously, toggle "hot keys" could work. With a watchdog after a "disk set" read, it shouldn't interrupt game play.
Last edited by kyuusaku on Wed Nov 26, 2008 4:09 pm, edited 1 time in total.
User avatar
loopy
Posts: 403
Joined: Sun Sep 19, 2004 10:52 pm
Location: UT

Post by loopy »

Hm.. it might be doable. Assuming NMI is enabled while games wait on the disk, you could stick some button checking code inside the BIOS NMI handler.

The automatic switching is convenient most of the time though. Maybe hold down a button to suppress automatic switching while you watch intros?
User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Post by kyuusaku »

I meant reading the pad in hardware, so a shift register -> comparator -> toggle-FF. No CPU time stolen, but pad reading a necessity.
User avatar
loopy
Posts: 403
Joined: Sun Sep 19, 2004 10:52 pm
Location: UT

Post by loopy »

Heh... that was easy. Hold down select to keep the disk ejected. Tested on Zelda and DokiDoki.
Great Hierophant
Posts: 777
Joined: Tue Nov 23, 2004 9:35 pm

Post by Great Hierophant »

I would like to hear the expansion sound, but I have a problem in that I am using a PowerPak with a Famicom AV and a 72 to 60 in converter. I know that on Famicoms, the sound is sent from the console to the cartridge on pin 45. If the cartridge does not have expansion sound hardware , it connects pin 45 to 46 and the sound is sent back to the console for output. If the cartridge has expansion sound hardware, the NES sound on pin 45 is mixed with the cartridge audio inside the cartridge and the result is output on pin 46. (All pins in this paragraph are Famicom pins)

The PowerPak outputs sound on NES Cartridge Pin 54, but does not mix the sound from the cartridge because the NES, unlike the Famicom, cannot send the sound out on the cartridge connector. Cartridge Pin 54 is connected to Expansion Pin 9, which is connected to Expansion Pin 3 on the mod through a 47K resistor.

Can I do the same thing with my 72 to 60 pin converter? Famicom Pins 45 and 46 are connected together on the converter as they would be on a Famicom cartridge that does not have extra sound hardware. If I soldered a 47K resistor between NES pin 54 and Famicom pins 45 & 46, would I get the proper sound? Does it matter that the Famicom would use an output and the NES uses an input?

The select feature works nicely to stop the disks from loading on Zelda. Castlevania II also seems to work with the FDS mapper.
ccovell
Posts: 1041
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Post by ccovell »

Loopy, the FDS audio sounds pretty good. I tried it on Palutena no Kagami, Zelda, Zelda II, and Yuushi no Monshou.

However, on my setup (Famicom Titler, 72-60-pin adaptor) the same problems exist with many FDS games. Some get to the title screen, but then display a repeated "Error 21", most Konami games simply reset to the FDS BIOS after the Nintendo copyright message, and some games show garbled CHR or NAM table graphics. Obviously the PPU and/or CPU is getting some kind of interference while loading games.

My wild theories: 1) The expansion pins on the PowerPak need to be grounded or something because their being connected to audio lines causes interference with PPU/CPU data lines. This could be true in some sense because of the glitches in your early VRC6 mapper whenever a sound plays, and because I see interference on-screen whenever the pitch changes in the FDS channel (only when the PowerPak expansion pin is connected directly to my TV's audio with no resistor attached.)

2) Games or the BIOS are somehow overwriting the FDS disk image currently loaded, causing the first *HVC-NINTENDO* identifier to be unrecognized. I don't know how true this might be because I don't know if your mapper stores them as "RAM" or "ROM" in the PowerPak's eyes.

Next, I tried out the NSF player for the FDS & VRC6, and both still have very poor sound, with garbled audio (sounds like the volume is being repeatedly muted and reenabled at some frequency (30Hz?), or with audio note pitch sounding completely off, or with the NSF simply crashing. My only guess with this one is that the NTSC/PAL timer may be just wrong. How about an NTSC-only mapper, with no timers interfering with playback? Since the FDS and VRC6 game mappers sound so good, it's a mystery why the NSF players would act all weirdly and sound garbled.

Anyway, on a positive note, the PowerPak used in my Twin Famicom loads FDS games just fine... :?
RGB_Gamer
Posts: 112
Joined: Sat Feb 23, 2008 5:26 pm

Post by RGB_Gamer »

I can't play NSF's on my PowerPak without it freezing (screen says File not found). I am using the Kevin Horton collection.

any luck with getting FDS saves to write to the PowerPak? I wouldn't mind playing Metroid on FDS

I am running my power pak (modded with graphics fix) on my RGB modded NES
Post Reply