To Byuu, About BSNES (BankSwitching related)

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
User avatar
Hamtaro126
Posts: 786
Joined: Thu Jan 19, 2006 5:08 pm

To Byuu, About BSNES (BankSwitching related)

Post by Hamtaro126 »

I would like to see NES-Style BankSwitching for use (like 20-in-1 for SNES for example), Only in configurable sets of 32k, 16k, 8k, and 4k.

Also I want to map range set to $7E0000-$7FFFFF, where we must select between RAM and ROM, If you can Implent this in BSNES, This will make things easier.

Please, And Thank you for a good emulator!
AKA SmilyMZX/AtariHacker.
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Post by Near »

> I would like to see NES-Style BankSwitching for use (like 20-in-1 for SNES for example), Only in configurable sets of 32k, 16k, 8k, and 4k.

Best you have now is S-DD1. You can map up to 256MB into 1MB blocks. Note that real hardware is almost certainly limited to 8MB, but I can't confirm from the software level like I can that SPC7110 can only support 8MB.

If you want more, you'll have to make it yourself. It's actually really easy, but I don't want to keep making fake chips without majorly compelling reasons.

> Also I want to map range set to $7E0000-$7FFFFF, where we must select between RAM and ROM

Impossible. Cartridges already respond in that range, but the SNES CPU ignores them and uses WRAM automatically. You cannot override it.
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Post by psycopathicteen »

Is it true that the 65816's direct page only works for bank $00? Recently I tried to direct page from banks $7e and $7f, but it kept reading and writing the video registers from bank $00, instead.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

True, at least based on what I remember from the Apple IIGS that used the 65816. TAD (or TCD) transfers a 16-bit value in A to the direct page base pointer D. The upper bits of D are always treated as $00. But that's still up to 32 direct pages minus what you're using for stack.
User avatar
Hamtaro126
Posts: 786
Joined: Thu Jan 19, 2006 5:08 pm

Post by Hamtaro126 »

I guess SNES is not fit enough for me,

This is one reason to create my own system, The current choices are not sufficant enough for me.
AKA SmilyMZX/AtariHacker.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

There's already a system for you: PC.
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

Some standart on simple bankswitching on SNES could be useful to make multigame carts out of separate games of different sizes and LoROM/HiROM. Like, if there ever would be a SNES Coding Combo, such thing could be then used to make a multicart out of the compo entires.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

I haven't traced official multicarts such as Super Mario All-Stars + Super Mario World, but can't each game just get its own set of program and data banks, with the NMI and IRQ vectors pointed somewhere in page $000100? Or is there something about Super NES programming that requires games to have code specifically in $008000-$00FFFF?
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Post by Near »

If you literally can't make something without 4K bank mapping, you might want to rethink what you're trying to do. 1MB bank mapping should work just fine for nearly all uses. I mean there were about 2,500 unique SNES games made with no mapping at all, after all :P

SNES gives you up to 12MB of ROM/RAM address space, not limited like NES to 32K.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Post by koitsu »

tepples wrote:True, at least based on what I remember from the Apple IIGS that used the 65816. TAD (or TCD) transfers a 16-bit value in A to the direct page base pointer D. The upper bits of D are always treated as $00. But that's still up to 32 direct pages minus what you're using for stack.
Just to confirm: this is correct. The upper 8 bits of the full 24-bit effective address when using DP is $00. In English: you can set D to $0000 to $FFFF, and thus the address will always be $00/0000 to $00/FFFF. See pages 46 and 94 onward for validation.

And if you say "well that sucks, what a crappy processor", I will repeatedly smash your balls with a hammer. :P Spoiled kids today...
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Post by Near »

I will admit that DP's DBR forced to $00 made full 16MB range open bus testing ... fun.

Code: Select all

   //MDR: unmapped region
   //x = addr
   //y = addr + $0300
   lda $0300,x; cmp #$03; bne {+}
   lda $0000,y; cmp #$00; bne {+}
   lda #$01; jsl usart1_write; rts; +
Can't do < 512-byte granularity this way. (Yes, I know that code does it at 1024-byte granularity.)
User avatar
Hamtaro126
Posts: 786
Joined: Thu Jan 19, 2006 5:08 pm

Post by Hamtaro126 »

I did not say that the processor is crap, but CA65 is not really great to set up for SNES, WLA is shit but everyone still uses it, and no offence, BASS is harder than XKAS as it is not in the original syntax.

I still can use CA65, just can be hard for SNES code!

About the Bank Problem: Some games tend to not work when converting source to NES to SNES.

Let's say I have disassembled Hebereke all the way (Not true for now) and I need to port it to use SNES code, Only One Problem, It depends on FME7 or MMC3 as the mapper, Otherwise it will not work!
AKA SmilyMZX/AtariHacker.
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

Isn't that is the whole point of porting, to change the code to make it work on a different architecture? I mean, rather than changing the architecture to make that code work.
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Post by psycopathicteen »

koitsu wrote:And if you say "well that sucks, what a crappy processor", I will repeatedly smash your balls with a hammer. :P Spoiled kids today...
Today's kids are upset that the direct page is only 256 bytes.

"How the hell am I going to fit an entire game in only 256 bytes?"
User avatar
MottZilla
Posts: 2835
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla »

If you are going to whine that SNES isn't good enough, do as tepples suggested and do whatever it is on PC. If not there are a ton of other platforms, PS1, PS2, DreamCast, Xbox, whatever.

Also, making a SNES multi-cart would probably be pretty easy. It's not like there is alot to it.
Post Reply