Does the DreamSNES program really limit RAM and CPU speed?

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
Adri_Magnon
Insane DCEmu
Insane DCEmu
Posts: 134
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sat Jun 01, 2002 10:53 am
Has thanked: 0
Been thanked: 0

Does the DreamSNES program really limit RAM and CPU speed?

Post by Adri_Magnon »

Hi,

I've read that the programs/emulators would 1) not recognize extra RAM if the DC had it and 2) would not run faster if the processor speed was doubled. Are those two things true? I mean, I was thinking that:

1) It WOULDN'T recognize the RAM because the programmer's wrote into the source code that only a certain amount of memory (?adresses) were available so that the program would not look for it.

2) it WOULD use the processor speed because I don't know why the programmer would limit the speed of the emulator. I mean, I know that if DCNester was running too fast they would limit it but it makes sense to me that they wouldn't write a max speed into, say DreamSNES. I mean, they might in certain areas of the sound was being over processed (the CPU spent more cycles than needed emulating it) and the transperencies wasn't getting enough attention.

Since the source code for some emulators are not available I can't check, but I figure maybe one of you know.

Thanks,

AdriMagnon

P.S. for those of you getting ready to attack, I think it would be a waste of everyones time to respond "It can't be done so don't ask." I will still think it is (hardware) possible unless someone can give verifiable sources as to why it isn't. And in any response I have to you, you will doubt it until I can PROVE it, since I think it is possible from my reading and looking around on the net, and postng those refrences when they might not get read is a waste of time. So, please, keep things focused on the program/emulator questions.

"You" by the way is the person who want to say it is impossible, not the general forum populace.
".. censoring knowledge, telling people what they must think and what ideas are impermissible, which lines of evidence may not be pursued, is the aperture to thought police, foolish decision-making, and long-term decline."
- Carl Sagan
User avatar
toastman
Iron Fist of Justice
Iron Fist of Justice
Posts: 4933
Joined: Sat Nov 10, 2001 3:08 am
Location: New Orleans
Has thanked: 0
Been thanked: 0
Contact:

Re: Does the DreamSNES program really limit RAM and CPU speed?

Post by toastman »

Adri_Magnon wrote:Hi,

I've read that the programs/emulators would 1) not recognize extra RAM if the DC had it and 2) would not run faster if the processor speed was doubled. Are those two things true? I mean, I was thinking that:

1) It WOULDN'T recognize the RAM because the programmer's wrote into the source code that only a certain amount of memory (?adresses) were available so that the program would not look for it.

2) it WOULD use the processor speed because I don't know why the programmer would limit the speed of the emulator. I mean, I know that if DCNester was running too fast they would limit it but it makes sense to me that they wouldn't write a max speed into, say DreamSNES. I mean, they might in certain areas of the sound was being over processed (the CPU spent more cycles than needed emulating it) and the transperencies wasn't getting enough attention.

Since the source code for some emulators are not available I can't check, but I figure maybe one of you know.

Thanks,

AdriMagnon

P.S. for those of you getting ready to attack, I think it would be a waste of everyones time to respond "It can't be done so don't ask." I will still think it is (hardware) possible unless someone can give verifiable sources as to why it isn't. And in any response I have to you, you will doubt it until I can PROVE it, since I think it is possible from my reading and looking around on the net, and postng those refrences when they might not get read is a waste of time. So, please, keep things focused on the program/emulator questions.

"You" by the way is the person who want to say it is impossible, not the general forum populace.
First of all, this looks to be more of a hardware issue than software. But hey, I'm flexible.
The DC wouldn't recognize the extra ram. The program has nothing to do with this part. The BIOS in the DC is set to recognize a certain amount of RAM. So in order to add more RAM, you would need to rewrite the DC BIOS. (Look into Dan Potter's Navi project for more info on rewriting the BIOS and what can be done by doing so.)
The CPU issue. If you managed to somehow overclock or upgrade the CPU of the Dreamcast, all programs would run faster unless they are limited by some other factor. Say if they waited on controller input before processing and controllers were polled every 200 milliseconds (these numbers came out of my ass for the purpose of illustration, in no way are these real) Your code would reach the controller input part faster, but it would have to wait for the controller to catch up before it could move on. (Once again, the whole controller thing is just a make-believe example for the purpose of illustrating a point)

Point being, DreamSNES would probably reach version 1.0 (the legendary full-speed release) before you managed to trick out your DC enough to run .97 full-speed.
But if you put enough time, money, and sweat into it, it is, at least, theoretically possible. That and its probably not worth the time, money, or sweat to do this as I imagine the cost would be great.
No signature.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Re: Does the DreamSNES program really limit RAM and CPU speed?

Post by BlackAura »

toastman wrote:The DC wouldn't recognize the extra ram. The program has nothing to do with this part. The BIOS in the DC is set to recognize a certain amount of RAM. So in order to add more RAM, you would need to rewrite the DC BIOS.
Erm... I don't think so. The BIOS has nothing to do with how the memory is mapped into DCs address space, and the BIOS does not do memory allocation. You'd have to rewrite the memory allocation code in KOS or whatever you're using, and possibly change the compiler settings, but the BIOS does not need to know. This is not a PC after all.
User avatar
toastman
Iron Fist of Justice
Iron Fist of Justice
Posts: 4933
Joined: Sat Nov 10, 2001 3:08 am
Location: New Orleans
Has thanked: 0
Been thanked: 0
Contact:

Re: Does the DreamSNES program really limit RAM and CPU speed?

Post by toastman »

BlackAura wrote:Erm... I don't think so. The BIOS has nothing to do with how the memory is mapped into DCs address space, and the BIOS does not do memory allocation. You'd have to rewrite the memory allocation code in KOS or whatever you're using, and possibly change the compiler settings, but the BIOS does not need to know. This is not a PC after all.
My bad, checking on Marcus's site I found this though:
When the built-in MMU is active, the mapping between logical and physical address is basically left up to the programmer (see the SH4 Hardware Manual for details), however the normal mode of operation in the Dreamcast is to have the MMU disabled, in which the mapping is fixed as described below.
And the MMU is one of the very underdeveloped areas of KOS.

That and looking at the DC memory map, it looks as if there may very well be an upper limit to the amount of RAM that can be addressed.
No signature.
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Post by Ex-Cyber »

When the built-in MMU is active, the mapping between logical and physical address is basically left up to the programmer (see the SH4 Hardware Manual for details), however the normal mode of operation in the Dreamcast is to have the MMU disabled, in which the mapping is fixed as described below.
And the MMU is one of the very underdeveloped areas of KOS.
And has very little to do with adding more memory. The MMU basically allows the programmer (in the context of "normal" systems this is assumed to be OS/driver programmers, but on systems like DC it could be people programming anything) to construct a custom memory map with any unmapped access causing an exception. This allows a massive amount of flexibility in terms of allocating memory to different programs and protecting the system from badly-behaved programs, but it has very little to do with physical address decoding. On SH-4 that is the domain of the BSC (Bus State Controller).
That and looking at the DC memory map, it looks as if there may very well be an upper limit to the amount of RAM that can be addressed.
As Marcus's memory map shows, the SH-4 divides its external physical address space into 7 areas of 64MB each (the eighth area is for onboard peripherals and processor configuration registers). Each of these areas has its own configuration registers in the BSC and its own chip enable signal conveniently decoded by the BSC. Thus, it seems likely that an upgrade to 64MB of main RAM could be done without any hacking of the BIOS (since the BSC settings for that area would not change) or address decoding connections (since the RAM would remain on the same CS signal). It might be possible to put another 64MB in area 2 if there's really nothing there, though that would require making a connection to the CS2 pin on the SH-4.
User avatar
toastman
Iron Fist of Justice
Iron Fist of Justice
Posts: 4933
Joined: Sat Nov 10, 2001 3:08 am
Location: New Orleans
Has thanked: 0
Been thanked: 0
Contact:

Post by toastman »

So, in a nutshell, how easy would it be to add RAM to the DC and what would you need to do.

Though I remember a few posts in the Hardware forum about this...
No signature.
atf487
DCEmu's Ranter
DCEmu's Ranter
Posts: 2529
Joined: Sun Feb 17, 2002 2:54 pm
Has thanked: 0
Been thanked: 0

Post by atf487 »

Just buy a PC. zsnes runs on almost every computer using to browse this webpage. If you REALLY want to play it on a tv, get a cheap-ass gaphics card w/ tv out.
Image
Tetris: 556-381-350-981
MKDS: 163-282-974-709
User avatar
toastman
Iron Fist of Justice
Iron Fist of Justice
Posts: 4933
Joined: Sat Nov 10, 2001 3:08 am
Location: New Orleans
Has thanked: 0
Been thanked: 0
Contact:

Post by toastman »

atf487 wrote:Just buy a PC. zsnes runs on almost every computer using to browse this webpage. If you REALLY want to play it on a tv, get a cheap-ass gaphics card w/ tv out.
I'm just asking because the "RAM question" is one of the most ridiculed in the Hardware forum, much like the dreaded "N64 question" is here. Some of these same people who have posted (apparently, though I could be mistaken) in defense of the RAM issue, have posted in opposition to it in the Hardware forum.

So, I'm asking straight up. Can it be done? And if so, how?
No signature.
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Post by Ex-Cyber »

As far as I know (not actually having analyzed the relevant connections on the board), what would be needed is to replace the SDRAM chips on the board with larger SDRAM chips of the same type. I wasn't able to find a datasheet for the chips my particular DC uses, but it appears that the following properties are desired:

100MHz-capable SDR SDRAM
4K refresh
16-bit
54-pin TSOP
256-megabit (for an upgrade to 64MB)

However, nobody seems to make 256Mb 4K refresh chips... 8K refresh might work but I wouldn't count on it working without a BIOS patch.

Anyway, as all of this is rather unconfirmed, I can't exactly recommend wholeheartedly that someone go forth and attempt the upgrade.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Theoretically, yes. However, I doubt anyone would try unless they have some DCs that they don't mind destroying.
User avatar
toastman
Iron Fist of Justice
Iron Fist of Justice
Posts: 4933
Joined: Sat Nov 10, 2001 3:08 am
Location: New Orleans
Has thanked: 0
Been thanked: 0
Contact:

Post by toastman »

From the man behind Icarus, the DC emulator for the PC:
By design the dc can actually support up to 32mb main memory, and 8mb sound ram and the only changes needed to support these upgrades are certain h/w mapped register settings... this is partly by consequence that the development boxes had support for the extra ram.
The link to the thread in which this was written:
http://www.consolevision.com/forums/YaB ... 1028648174
No signature.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Interesting...
Lartrak
DCEmu Respected
DCEmu Respected
Posts: 6166
Joined: Thu Jan 31, 2002 9:28 pm
Has thanked: 0
Been thanked: 0

.

Post by Lartrak »

"Just buy a PC. zsnes runs on almost every computer using to browse this webpage. If you REALLY want to play it on a tv, get a cheap-ass gaphics card w/ tv out."

Yeah, that'd be great if everyone had their TV within easy reach of their computer (mine is around 150 feet away from the closest). Not to mention a cheapass graphics cards TV out looks really, truely awful.

I do play SNES emulated sometimes, but just in general I don't like most types of gaming on the PC that much.. The only exceptions really are FPS and strategy. I know a lot of people who feel the same way.

Oh yes, and sorry for the off topic reply ;p
tom61a
Insane DCEmu
Insane DCEmu
Posts: 248
Joined: Thu Mar 28, 2002 3:36 pm
Location: USA
Has thanked: 0
Been thanked: 0

Post by tom61a »

Overclocking the CPU wouldn't affect most comercial games and homebrew games, since most of those use the RTC (real time clock) to derive thier timings. A few things may run fast, but most stuff would look and feel the same, unless you changed the timings to the Maple bus (which would potentially stop controllers and VMUs from working).

Higher emulators like DreamSNES, I can only infer from PC emulators. When a PC is too slow to emulate something, it does nothing to slow it down, it runs at whatever speed it can. When a PC is faster than what it needs to be, most emus look at the RTC to keep it at 100% speed.

Upgrading the RAM wouldn't be seen by all programs currently out, but adding support shouldn't be to hard for homebrew programs. The problem is that it'd be physically hard to do it. Surface mount components are a problem to work with, even if you have the proper equipement.
Post Reply