65816 really 16 bit or just a 6502 with 16 bit registers

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
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by Drew Sebastino »

TOUKO wrote:the CPU can be halted during all the Vblank and cannot play any PCM in that period .
Wait, can you only upload audio data during Vblank? I really don't have a good understanding of how audio in the SNES works because I haven't gotten there yet. I feel that they spent too much money on the audio system though.
TOUKO wrote:But guys, do you think tha the 65816 is a 16 bit processor or not ??
Yes. However, if the 65816 is a 16 bit processor, the 68000 is (at least for the most part) a 32 bit one.
Stef
Posts: 259
Joined: Mon Jul 01, 2013 11:25 am

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by Stef »

Lot of external bank system use serial write for cost reason (only 1 pin used for write).
For me the Z80 bank register on MD is not what hurt the most... i think the DMA mastering the main BUS is the biggest issue :-/
You can overcome it but still that requires to cleverly design the driver for that.
User avatar
TOUKO
Posts: 305
Joined: Mon Mar 30, 2015 10:14 am

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by TOUKO »

Wait, can you only upload audio data during Vblank?
Of course no with a classic sound chip, but with a PCM based chip you must maintain the PCM flux,even in vblank else it would sound bad .
This is why the SPC exist, to avoid PCM interruptions when the 65816 is halted by DMA, it's the same for Z80 in the MD(but not as critical as snes because PCM is not his main audio feature) .

If you want to remove the SPC, you must replace the entire audio system, by a classic one,like FM for exemple.
Stef
Posts: 259
Joined: Mon Jul 01, 2013 11:25 am

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by Stef »

What could be nice for sound is just having a simple ADPCM chip capable of reading sample directly from the ROM but owning a small internal sample cache so it can uses DMA transfer to feed it :)
User avatar
TOUKO
Posts: 305
Joined: Mon Mar 30, 2015 10:14 am

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by TOUKO »

Stef wrote:What could be nice for sound is just having a simple ADPCM chip capable of reading sample directly from the ROM but owning a small internal sample cache so it can uses DMA transfer to feed it :)
i agree, 1 sound genrator + 1/2 PCM voice (like ADPCM) would be the best combo for me, plus ADPCM chip just need to be driven at the start of sample, and is not affected by DMA contention .
Yes. However, if the 65816 is a 16 bit processor, the 68000 is (at least for the most part) a 32 bit one.
however it's very different, because the 68k split the 32bit operations, in 2 16bit,in contrary the 65816 do really 16bit ops in native mode(it don't split in 2 8bit) .

And personnaly i don't think that the 65816 is only a 6502 with 16 bit registers like stef think .
The 386SX on the FM Towns Marty also is a 32bit CPU with a 16 bit data bus but still considered 32 bit

How about the SA-1 ??, it's simply a 65816 core or an improved/custom one ?? (i don't speak of DMA, and all others feature embedded, but only the CPU core) .
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by rainwarrior »

Stef wrote:For instance it has some nice sound capabilities but severely limited by the small amount of dedicated memory...
It was plenty good enough to produce some of the best game soundtracks of all time.

Whenever memory is limited, it is a problem for anyone working with it. This was always a major part of game development. If it had twice as much RAM you'd still be complaining. ;) It's like that myth about a goldfish that grows to meet the size of its bowl. Unless your goals are drastically smaller than the memory you have, it's going to be one of your biggest problems, and solving that problem is what a good developer does.

I think that's actually the strongest factor in the current "indie renaissance" going on in game development right now. Anybody can make a game now because its biggest problems have been obviated by cheap memory and computing power.


As for whether 65816 counts as 16-bit or 8-bit, I'm with Harrison Ford on this matter. :beer: :D
User avatar
TOUKO
Posts: 305
Joined: Mon Mar 30, 2015 10:14 am

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by TOUKO »

As for whether 65816 counts as 16-bit or 8-bit, I'm with Harrison Ford on this matter. :beer: :D
Ahahah, :mrgreen:
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by tepples »

For the sake of accessibility, and in case the talk show clip to which rainwarrior linked gets taken down by the talk show's copyright owner, let me summarize it for the record:

Harrison Ford is a guest on a late night talk show. (I'm guessing it's to promote a recently released Indiana Jones film.) When someone is quizzing him on the color of the tip of the whip carried by Jones, Ford replies: "Who gives a $#!+?"
User avatar
TOUKO
Posts: 305
Joined: Mon Mar 30, 2015 10:14 am

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by TOUKO »

Ok ,i found that in the official WDC's documentation:
The WDC W65C816S is a fully static CMOS 16-bit microprocessor featuring software compatibility* with the 8-bit NMOS and CMOS 6500-series predecessors.
A software switch determines whether the processor is in the 8-bit "emulation" mode, or in the native mode, thus allowing existing systems to use the expanded features.
I think there is no doubts now .. :)
User avatar
Ramsis
Posts: 341
Joined: Sun Jul 01, 2012 6:44 am
Location: Lion's den :3
Contact:

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by Ramsis »

TOUKO wrote:But guys, do you think tha the 65816 is a 16 bit processor or not ??
I think you're bent on dragging an ever so pointless debate from the '90s console wars era to the present. :P
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)
User avatar
TOUKO
Posts: 305
Joined: Mon Mar 30, 2015 10:14 am

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by TOUKO »

Ramsis wrote:
TOUKO wrote:But guys, do you think tha the 65816 is a 16 bit processor or not ??
I think you're bent on dragging an ever so pointless debate from the '90s console wars era to the present. :P
yes i know, but personnaly i don't care of those details, even if the 65816 was a 4 bit CPU, for me only the perfs count . :wink:
But some Md fans claim that the 65816 is weak because it's a 8bit CPU,and the 68k is mush more faster because it's a 32bit CPU, we all know the song .
This CPU is not perfect, has a low frequency, coupled with crappy WRAM, and the snes has some wonders like super aleste,RR², SF2, DKC series, etc ...

i like all the machines of that era, with their cons/pros.
Last edited by TOUKO on Thu Jul 28, 2016 11:39 am, edited 1 time in total.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by Bregalad »

TOUKO wrote:But guys, do you think tha the 65816 is a 16 bit processor or not ??, that's in fact also the question :P
I think it is a 16-bit processor because it has a 16-bit ALU, which is really the hearth of the CPU. However we have to admit the 8-bit data bus is a limitation, but also an advantage as it can connect to more traditional ROMs and adress decoding chips, which would be harder to use if the data bus was genuinely 16-bit.
TOUKO wrote: Snes's sprites system is also bad and need to be rethinked, this nes heritage should be out and replaced by a real SAT, with multiple size on screen at the same time .
Wow, this makes no sense, the SNES indeed allows multiple sprite sizes on screen at the same time - you are limited to 2 sizes but in software you can simulate anything with metasprites so it's not really a limitation.
Why did they though when they were implementing the 64x64 sprite size for instance ?
64x64 sprite size is very useful to simulate an extra BG when mode 7 is used for the real BG. It's also possible with 32x32, but takes 4 times more sprites (you need 8x7 sprites to fill the screen as opposed to 4x4). A lot of games do this - I have not checked which ones uses 32x32 or 64x64, though. Also, most do that only for parts of the screen, intelligently.
No SPC700 or 64KB of audio ram, just have the 65816 handle audio...
Considering how much the 65c816 is criticized for not being fast enough, I cannot imagine how poor it'd be at rendering audio. The 16 MHz ARM on the GBA is already the bare minimum, and most games have audio engines of poor quality.

To be honest i think that a major part of the SNES is badly designed... really.
For instance it has some nice sound capabilities but severely limited by the small amount of dedicated memory... i can understand the quantity was driven by cost but then, why designing it in a way so we can't easily stream sound data to overcome that limited memory ?
Same thing for the graphics capabilities, a large part of video mode aren't really useful, the video chip is overcomplicated and most of its features useless.
Well, it saddens me to admit it, but you are partly right, especially about the SPC700, which would greatly benefit from extra memory. Nevertheless, it was probably supposed to be only 32k before the release of the console, so at least they expanded it to 64k.

The SPC/CPU design is fine, but they should have designed them in a way so that one CPU can interrupt the other (is doesn't really matter which), so that they could synchronize and stream data more easily.

If I were to "redesign the SNES" as Espozo suggest, I'd add NES backwards compatibility, and add accessible NES pAPU audio channels to SNES games, so it could sound similar to a GBA :) Even if this means scarifying one or two sound channels for the SPC700.
User avatar
TOUKO
Posts: 305
Joined: Mon Mar 30, 2015 10:14 am

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by TOUKO »

I think it is a 16-bit processor because it has a 16-bit ALU, which is really the hearth of the CPU.
yes i think so too ..
Wow, this makes no sense, the SNES indeed allows multiple sprite sizes on screen at the same time - you are limited to 2 sizes but in software you can simulate anything with metasprites so it's not really a limitation.
Of course, but is far to be as practical as if the PPU allow you to select directly multiple size in hardware like Md or PCE ..
Is not a normal thing to spend more CPU power to do that,this not like if the CPU has plenty of cycles to spend on things like that . :wink:
Last edited by TOUKO on Sat Jul 30, 2016 8:53 am, edited 1 time in total.
User avatar
Ramsis
Posts: 341
Joined: Sun Jul 01, 2012 6:44 am
Location: Lion's den :3
Contact:

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by Ramsis »

TOUKO wrote:yes i know, but personnaly i don't care of those details
Oh really? :wink:

Let's see:
TOUKO wrote:For me the bit of a CPU is dependant of his ALU, but Z80 have a 4 bit ALU multiplexed to 8 bit .
TOUKO wrote:Not for me, the 68k like the 65816 has a 16 bit ALU,i said even if the 68k could do 32 bit ops, they are splited internally,into 2 16 bit ops, in contrary to 16 bit ops in the 65816.

Seems to be the same thing, i think that the 8 bit ops on Z80(because of the 4 bit ALU) is close to 32 bit on the 68k, may be this why the Z80 efficiency is not so fabulous(but it's not a bad or weak CPU, is only less efficient) .
TOUKO wrote:For the Md weakness, i dislike the FM chip,he is very slow and a low grade FM chip IMO,too often the sound Fx are terrible,musics are really excellent in some case (treasure, techno soft,in midnight resistance),i dislike the volume setting,too high(seems to be hard to set correctly).
The PCM capacities are bad, because you have no volume control,nor panning and you must use timed code with Z80 for correct rendition,i noticed very distorded samples in your XGM driver(it's not your driver fault, but the difficulty to sync the samples stream with the 2612's DAC),but not always,it depends of what sample you are playing,plus the stupid Z80's banking system .
TOUKO wrote:
Is the Z80 banking any more stupid than MMC1? And is the PCM any worse than NES $4011?
if i remember correctly, it's serial, and 1 bit at a time, you spend 100+ cyles to map a bank .
And is the PCM any worse than NES $4011?
worse no, they are not scratchy, or muffled, only distorded,but it's very audible,and you must be carefull of DMA contention,which can be problematic.
The real problem with the 6502 is that it isn't really designed to run C well. The 65816 improves on this somewhat with the d,S and (d,S),Y addressing modes, as well as the base pointer register that TCD and PLD set. But arrays of structs in the heap are still a mess because there's no quick way to add a number other than 1 or -1 to an index register.
Of course in that case you're right, 65xxx are not suited for high level languages, this why i'll go for 68k in a PC, you need of this king of CPU (large addressable memory, not bank mapping,good performance for high level language,no need expensive memory, useful when you need a big amount) .
For a game system,with limited resource requirements i'll prefer a 65xxx, fast, a huge margin for optimisations,a fast interrupt system, a lower amount of bytes taken by compiled code,not expensive at all,very well suited for game systems .
TOUKO wrote:the CPU can be halted during all the Vblank and cannot play any PCM in that period .

(…)

CPU power on snes is problematic because of the weak WRAM, rather than 128ko, nintendo should use
faster RAM, but lesser, like 32/64 ko .
Snes's sprites system is also bad and need to be rethinked, this nes heritage should be out and replaced by a real SAT, with multiple size on screen at the same time .
TOUKO wrote:This is why the SPC exist, to avoid PCM interruptions when the 65816 is halted by DMA, it's the same for Z80 in the MD(but not as critical as snes because PCM is not his main audio feature) .

If you want to remove the SPC, you must replace the entire audio system, by a classic one,like FM for exemple.
TOUKO wrote:1 sound genrator + 1/2 PCM voice (like ADPCM) would be the best combo for me, plus ADPCM chip just need to be driven at the start of sample, and is not affected by DMA contention .
Whoa, sooooo many details … which you totally don't care about. :mrgreen:

The lesson to learn here, people, is to leave the past behind for good. We're not in the 1990s any more. Eat that. And stop bringing up pointless '90s discussions over and over again. Stop listening to those who're into the field simply for their own need of "nostalgia," which they'll typically bring up as an argument to support their untenable views.

Ramsis (signing off of this ridiculous thread)
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Re: 65816 really 16 bit or just a 6502 with 16 bit registers

Post by Bregalad »

Of course, but is far to be as practical as if the PPU allow you to select directly multiple size in hardware like Md or PCE ..
Indeed, especially considering there's 4 documented sizes, so selecting them directly would be doable with 2 bits, just 1 more than selecting small/big like it is done. Nevertheless, I do not think it is a major issue.
Locked