Login
Forum Help



Post Your Message
Username: (Login)

Topic:
Message:
 


Previous Messages
Posted By

ytm
on 2024-09-14
16:53:49
 Re: How much ROM is faster than RAM

There is a project that replaces real 6502 with an emulated one using Teensy4.1 with some latches and buffers to shift 3.3V logic into 5V and back. Teensy is a module that has ARM processor, onboard RAM and Flash.

The benefit (compared to FPGA or trying to interface with 65C816) is that it's an emulation, so there is complete control over what the emulated CPU does and sees on the bus.

For instance the memory access can be realized in different modes:
A: reads and writes go to computer's bus (100% cycle accurate, no speedup)
B: using onboard RAM: reads go from Teensy's RAM, writes go to computer's bus (speedup and changed bytes exist in mainboard RAM, so they are visible to the video chip)
C: using onboard RAM: reads and writes access only Teensy's RAM (huge speedup, but no data is passed to mainboard RAM, nothing would change on the screen)

This can be assigned to any memory area (mixed and matched) and resembles a bit Amiga's fast/chip/slow RAM types. I/O area is a special case and always has to use mode A.

ROMs were simply put into Teensy's flash to make them available at full speed in any mode. The author of the original project even added some more optimizations for modes B/C - like skipping over otherwise "wasted" cycles of 6502.

These modes can be switched in software but also by a physical switch (SCPU had it). For C64 I added fast mode that mimics C128 2MHz mode (but faster). SCPU also had a default mode for BASIC where whole memory area except the screen RAM was in the fast mode. So BASIC was running fast but any writes to the screen were synchronized with onboard RAM to make them visible for VIC.

I have played a bit with this for C64: https://github.com/ytmytm/teensy64 - I left it to be redesigned a bit.

Posted By

orac81
on 2024-09-11
07:24:15
 Re: How much ROM is faster than RAM

My understanding was that the +4 can run at 1.8 mhz when ted is not in use, 0.9 mhz when sharing the bus. A fast cpu would have the same signals available to tell it not to access main memory. it could have cache like sram with 64 k of extra bits telling it what locations cannot be shadowed for read/ write..
You could have an external button for fast mode.

True not much would be written from new for it, but some software would benefit (chess, rendering calculation progs etc).
A device driver for geos would make all geos apps fast.
You could run os like cpm6502 (has anyone ported that?) etc..

Posted By

MMS
on 2024-09-10
19:28:05
 Re: How much ROM is faster than RAM

Thank you

Posted By

siz
on 2024-09-09
19:55:29
 Re: How much ROM is faster than RAM

My main interest in retro computers are watching (and sometimes making) demos. If you change the CPU speed in a system that is not designed for that practically all the timings are gone and the screen falls apart. And even for a lot of games.

As for your practical questions: yes, the CPU can access all peripherals (including RAM/ROM/ACIA) at double speed.

I couldn't find exact timings for the ROMs used in plus/4 but several EPROMs of the era claim "fast access time of 200ns". That would mean 5MHz theoretical maximum speed for them (if my calculations are correct and no other signal times should be considered). The RAM chips typically found in the plus/4 has an access time of 150ns.

Posted By

MMS
on 2024-09-09
17:12:07
 Re: How much ROM is faster than RAM

First of all, I highly respect the feedback of the HW guys.
I do not think, that my knowledge is beyond yours, and I also forgot a lot of things since university.

But I know two platforms, where a much faster CPUs put into a complex system, and little similiar to ours, it plays an almost independent life from the system. I do not say it is ideal, as the 6MHz Z80 (SAM Coupe), and the 2.8MHz 65816 (Apple IIGS) could work way faster than what the design let them to happen, but still, an increase.

Just there are some issues I simply cannot overcome
1) "In the VIC-II document by Christian Bauer stated that there are 312 raster lines, and 284 is visible on the screen.
Plus/4 has a very similar setup the 312 - 200= 112 rasterlines of non TED screen area is there, but TED needs some cycles to 7501 to switch over, so the 109 cycles looks pretty exact.".

So we have 109 clean rasterlines (35%), and at every horizontal line a little fraction high FRQ CPU. I mean ~40% of the time the CPU is at double speed VS TED clock speed. This gives us a ~28% gain VS C64 (in non BASIC mode). This is not insignificant.
So if the CPU can be doubled (6502 able to do it) that 40% part would further increase, it would be faster than the C128.

2) Right now the 7501 can reach the RAM and ROM even at the current double speed?
Reading through the 264 Hardware specification ( Hayney, Herd) it is not crystal clear for me if the CPU can access memory in Double Frequency mode?
So if 1.76MHz is not an issue, what is the upper limit WITHOUT major problems? for ROM. SRAM we discussed.
Thanks (if you have the time to answer it)

Anyhow, it seems I am the only one interested a faster Plus/4 (using the available architecture), so...

Posted By

siz
on 2024-09-09
07:18:03
 Re: How much ROM is faster than RAM

like Vampire board turned the Amiga a well useable fast computer

Ouch! I know that it's a religious war but the Vampire is anything but usable. Yeah, the benchmarks are impressive and the few stuff that has been optimized for it is fast. But it has a lot of compatibility problems (especially in the FPU area).

And Amiga was made to accommodate faster CPUs. Ours was not. Some CPU intensive programs (or slow BASIC programs) would benefit from a faster CPU. But in the end you should slow down everything for compatibility. It could be a nice wild demo platform but practically none of the existing software could use it.

Posted By

MMS
on 2024-09-08
14:03:37
 Re: How much ROM is faster than RAM

@Sukkopera: Well I have to agree with you: the HWs without the SW supporting it just fancy add-ons. But if the CPU is just faster without any special command, then every software would benefit from that. Well, the arcade game would be unplayable, but eh. (I mean: the special SRAM content, the copy of the ROM into SRAM and the proper paging should be the part of the machine start-up sequance, like linking the JiffyDOS ROM, needs no special SW support, SYS command or interaction from the user)

Posted By

MMS
on 2024-09-08
13:55:58
 Re: How much ROM is faster than RAM

@Sukkopera: Well I have to agree with you: the HWs without the SW supporting it just fancy add-ons. But if the CPU is just faster without any special command, then every software would benefit from that. Well, the arcade game would be unplayable, but eh. (I mean: the special SRAM content, the copy of the ROM into SRAM and the proper paging should be the pasrt of the machine start-up sequance, like linking the JiffyDOS ROM, needs no special SW support, SYS command or interaction from the user)

Posted By

SukkoPera
on 2024-09-08
13:48:33
 Re: How much ROM is faster than RAM

Well, this is not far from that: https://www.e-basteln.de/computing/65f02/65f02/. It would just need the +4 memory map to be built into it. But I agree with @gerliczer: even if we got it to work, there would be no point in it unless a significant amount of software was written for it. And seeing how expansions for 256+ kB RAM, SID, 4-channel DAC, YM3812, AY-3-8910, 2-button controllers, SNES controllers - and soon WiFi grin - already exist and are totally ignored by the developers, I wouldn't hold my breath! happy

Posted By

MMS
on 2024-09-08
13:36:23
 Re: How much ROM is faster than RAM

@gerliczer
well, following that concept, none of the CPU booster and warp cards for APPLE II, BBC or Amiga (like Vampire board turned the Amiga a well useable fast computer) made any sense also the SuperCPU for the C64, not to mention the faster CPUs and more RAM for PCs. Why those crazy guys and hardware developers made all of these new stuff?
Just my view.

update: I agree there are no productivity software we really can use like the Amiga guys (edit: and the action and arcade games do not benefit from faster CPU), GEOS would benefit from significantly more RAM (identified by the SW) or much faster floppy drives.

But Driller, Total Eclipse, Mercenary, Elite could really use some more CPU power (edit: and all the chess programs and graphical advantures, drawing the gfx, the The Hobbit, Eric the Viking, Arrow of Death, and all the Scott Adams SW, like Spiderman+4, etc)

Posted By

gerliczer
on 2024-09-08
07:34:41
 Re: How much ROM is faster than RAM

No HW guru myself, but here are my thoughts. It can be done with today's possibilities. It can be done in even more sophisticated fashions than you came up with. But it needs much-much work, potentially breaks compatibility and most probably it will lack penetration. So, in the end, why and what for? If you want to do it as a pet project to see if you can manage to pull it off, go for it. Otherwise there's little sense to it.

Posted By

MMS
on 2024-09-08
14:04:33
 Re: How much ROM is faster than RAM

Reopen this thread:

I open from a little far:
I recently watched a video about APPLE IIGS, and why it was set so slow (2.8GHz CPU). There was a legendthat steve Jobs forced it to show the Macintosh more competitive, but in fact it is not true. WDC could not get enough 4Mhz 62816 CPUs to safeguard production, the yield were very low, and it took a half decade to get somewhere near 7MHz

During the video I noticed the smiliarities of Apple IIGS to our platform. When then 62816 worked, it was kind of separated from the rest of the system, but when it emulated AppleII, it had to switch back to 1MHz to able to communicate with eg. old cards, Apple II emulator's RAM and ROM.

In 2016 we did not have cartridges, extensions, and we had very few dedicated HW gurus who created stuff for us.
Since then a lot of things changed. One of them is the Lotharek's 6502Plus4 CPU replacement, proviced Hannes compatible 256KB (512KB happy ) SRAM.

Now the topic is: SRAM known to be significantly faster than DRAM and ROM, reacts really fast to read commands, and like ROM, it does not need refresh (RAS,CAS signals).
So it is easier to realize HW, but it also has speed benefits.

I had a small discussion with Max on this matter in the past, that is needed to have a faster CPU instead of the 7501/8501 CPU?
As theoretically you can set a higher FRQ for the CPU (TED is off) than the current one. When the picture comes into picture, the TED will slow CPU down.
The answer from Max was that even if the FRQ would be higher, the CPU could not reach the slower parts, RAM/ROM, but we may mention here the 6551.
But in case the SRAM is available this problem is solved, at least for the DRAM.

In this case I remember, how PCs managed the Shadow BIOS (mentioned by Siz and Csabo too), they cpoied the 8bit ROM BIOS into fast RAM, gained significant speed. When we have so much unused SRAM in Lotharek 6502Plus4 it could have been done here too. I mean, two complete segments are the clone of the Kernal and other ROM, while in the other ones we could run the RAM as usual.
It means, if the (emulated) CPU could run much faster, adding a FRQ doubler or quaddoubler circuit between the TED and CPU, the CPU (in it's fast period) can run much faster then the rest of the system, like in AppleIIGS. No new FRQ required to be set by TED, but the signal is hacked, upgraded
The SRAM could support this mode, CPU speed is not a problem. When needed to swith between ROM and RAM (BASIC), +4 would switch between SRAM segments, cotaining the ROM or RAM content. When TED comes in, CPU switches back to slow mode.

HW gurus, what is your opinion on the idea?
update: I do not see any blapshemy there, C64 extended a lot in the past with RAM, stronger CPU, HDD, better floppy drives, not to mention the ATARI guys who really changed their machine with even new gfx modes and quadro digi sound cards (in Poland).

Posted By

Csabo
on 2016-06-27
10:26:48
 Re: How much ROM is faster than RAM

I wouldn't say misinformation, just confusion, because the original question, and several of the terms used are ambiguous. Otherwise several (seemingly contradictory) things said above are correct. Let's break it down:

Time it takes for the processor to read one byte (basically an LDA statement): it's the same. For example, an LDA$8000 could read either from ROM or RAM, but it will be always exactly 4 cycles. (This was correctly pointed out by Degauss and zorkon above.)

Time it takes to read byte from BASIC (which is what I suspect SVS is originally asking): this could very well be different, I'm going to trust what Litwr said above. However, it doesn't have to do with the speed of RAM or ROM chips, but rather how the BASIC statement is translated to machine code. If there's more paging involved for one of them, it will be different.

And finally, the actual speed of the RAM and ROM chips: probably different, but this doesn't matter. I know nothing of hardware stuff, but several folks pointed this out, so I'm going to assume they are right.

Now, did that clear everything up? happy

Posted By

sanap kalinda
on 2016-06-27
06:38:30
 Re: How much ROM is faster than RAM

RAM is typically faster than ROM...

Posted By

zorkon
on 2013-10-04
13:31:21
 Re: How much ROM is faster than RAM

Interesting how such a simple question can generate so much misinformation.

- The Plus/4 clock frequency is so slow that neither RAM nor ROM access speed are limiting speed in any way. The access speed is exactly the same for both.
- On 90ies PCs there was a time when RAM access was 16 or 32bit, while the BIOS was stored in an 8 bit EPROM. Therefore ROM access speed could be increased by copying the BIOS to RAM. Nowadays the BIOS is only needed to boot the pc, so who cares...

Posted By

Litwr
on 2013-09-30
14:05:01
 Re: How much ROM is faster than RAM

ROM is faster to read at Basic because the read access to RAM uses CHRGOT.

Posted By

siz
on 2013-09-29
03:49:36
 Re: How much ROM is faster than RAM

RAM's are faster than ROMs for a long time. From the early 90s (or late 80s) when CPU clocks (1 cycle) were faster than the typical access time of memories it became a factor to quicken memory access so they started using the so called shadow ROM (copying contents of ROM to the underlying RAM area and).
In case of the plus/4 RAM and ROM access are both quicker than the CPU cycle so their access times are indifferent, you won't sense any difference (as the former posters said before)

Posted By

Degauss
on 2013-09-28
18:28:18
 Re: How much ROM is faster than RAM

It will be exactly the same speed. We only got one clock in our computers, right?

Posted By

MMS
on 2024-09-08
14:31:27
 Re: How much ROM is faster than RAM - CPU speed increase potentials?

Hm, as per my memories the ROMs typically slower than RAM, maybe valid from intel8088 system onwards only. If you copy the ROM into RAM, no need to switch between them and you save some time happy

Posted By

Csabo
on 2013-09-26
14:39:54
 Re: How much ROM is faster than RAM

They should be exactly the same, I think. Regardless of where you're calling, doing an LDA#$00 (for example) will take exactly two cycles.

Posted By

SVS
on 2013-09-26
14:35:02
 How much ROM is faster than RAM

ROM access is surely faster than RAM. Then I was thinking if anybody did try to measure what is the ratio.
I mean a routine running from ROM compared with the same code running from RAM.
What do you think about?


Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon