Are 4KB banks really used?

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

Post Reply
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Are 4KB banks really used?

Post by krzysiobal »

Long time ago I built this hardware nsf player based on Xilinx XC9572XL CPLD (72 macrocells):
viewtopic.php?t=13436

I remember having real trouble of squeezing all of the logic inside, but I succeded. It was a prototype and now I would like to start mass production, with small sexy OLED display. But instead of this CPLD, I prefer EPM3064 (which I share with other projects) and which has 64 macrocells. I need to make some optimizations to fit into. I was wondering if it would work if instead of 8x 4kb banks, I would provide 4x 8kb banks:

Code: Select all

NSF    Address      Register                  NSF        Address      Register
====   ==========   ========                  ====       ==========   ========
$070   $8000-8FFF   $5FF8                     $070/$071  $8000-9FFF   $5FF8/$5FF9
$071   $9000-9FFF   $5FF9             ->      $072/$073  $A000-BFFF   $5FFA/$5FFB
$072   $A000-AFFF   $5FFA                     $074/$075  $C000-DFFF   $5FFC/$5FFD
$073   $B000-BFFF   $5FFB                     $076/$076  $E000-FFFF   $5FFE/$5FFF
$074   $C000-CFFF   $5FFC                   
$075   $D000-DFFF   $5FFD                   
$076   $E000-EFFF   $5FFE                   
$077   $F000-FFFF   $5FFF                   
so that lowest written bit is ignored and two siblings registers are glued. I quickly analyzed all available NSF songs to inspect the banksw init values if the adjacent values differ only on the lowest bit and the lower one has it equal to 0 and upper one has it equal to 1 and not to my surprise, only a few of FDS games were affected:

Code: Select all

                                                  70 71 72 73 74 75 76 77
-----------------------------------------------------------------------------
Hwang Di - Zhu Lu Zhi Zhan                        04 04 04 04 04 04 04 04
Metroid                                           05 05 05 05 05 05 05 05
Patlabor - Mobile Police (FDS)                    01 02 02 02 02 02 02 02
Super Mario Bros. 2 JP (FDS)                      02 03 04 05 06 07 0c 0c
Yume KooJoo Doki Doki Panic                       02 03 04 05 06 07 0c 0c
Image My website: http://krzysiobal.com | Image My NES/FC flashcart: http://krzysiocart.com
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Are 4KB banks really used?

Post by lidnariq »

Apparently the default Famitracker export makes 12KiB banks for DPCM, grouping $C000, $D000, and $E000 as a set.
User avatar
aquasnake
Posts: 515
Joined: Fri Sep 13, 2019 11:22 pm

Re: Are 4KB banks really used?

Post by aquasnake »

The 128 bytes of the nsf file header will be copied to the $F000 starting space after being converted to mapper #31.And the sound samples will be stored in $8000- $EFFF;

Therefore, the PRG mode of 8+8+8+8 can only be used unless the mapper #31 protocol is modified to directly locate this portion to $E000 and restrict accessing to nsf sound sample data to before $E000.

I strongly recommend modifying this mapper #31 protocol to simplify hardware design (reducing costs but losing efficiency with space).

There are definitely many people who will oppose me, especially after the mapper #31 specification has been released before, my disharmonious voice will have a certain degree of negative impact on some people or organizations.

If don't modify the mapper # 31 specification, I will use my own dynamic loading method to expand and implement the 8+8+8+8 mode. I believe many authors who designing or having designed flashcarts have already adopted this method for a long time
Post Reply