Schrijver
| MSX Turbo R.
|
msd msx professional Berichten: 607 | Geplaatst: 07 September 2006, 15:09   |
@AuroraMSX: dennis kollard already made a no wait turbo r  |
|
NYYRIKKI msx master Berichten: 1502 | Geplaatst: 07 September 2006, 15:21   |
Quote:
|
But anyone know how CPU switch works? During program execution?! How can do it?
Should they freeze the other cpu and enable the r800 at the same PC address it was executing code the old z80?
|
The CPU switch works by calling BIOS address #180 with CPU mode in register A. The PC is not actually transferred from CPU to another, but because the switching is done every time in same address in BIOS it does not matter as the other CPU remembers the same address from the past. (when it was swithced off) Both CPU's start from address 0 when they are powered up.
|
|
PingPong msx professional Berichten: 876 | Geplaatst: 07 September 2006, 17:43   |
Quote:
| Quote:
|
But anyone know how CPU switch works? During program execution?! How can do it?
Should they freeze the other cpu and enable the r800 at the same PC address it was executing code the old z80?
|
The CPU switch works by calling BIOS address #180 with CPU mode in register A. The PC is not actually transferred from CPU to another, but because the switching is done every time in same address in BIOS it does not matter as the other CPU remembers the same address from the past. (when it was swithced off) Both CPU's start from address 0 when they are powered up.
|
So how can the execution continue from last istruction? (see loop label above...)
pseudocode:
ld b, my counter
call switchtor800
loop:
djnz @loop
call switchtoz80
or simply does not continue...? |
|
Edwin msx professional Berichten: 592 | Geplaatst: 07 September 2006, 22:13   |
Quote:
| The CPU switch works by calling BIOS address #180 with CPU mode in register A. The PC is not actually transferred from CPU to another, but because the switching is done every time in same address in BIOS it does not matter as the other CPU remembers the same address from the past. (when it was swithced off) Both CPU's start from address 0 when they are powered up.
|
Actually, it does matter for the first switch. Only one cpu can run from 0 to the switch point. So the second should still be at 0. |
|
Sonic_aka_T
 msx guru Berichten: 2261 | Geplaatst: 08 September 2006, 00:36   |
Quote:
| Quote:
| It's hard to say how much faster the R800 is. It really depends on the task it's executing, but generally you can assume anything from 4-10x as fast, 5-6x being the average. Pretty much all software runs on the turboR by the way, and most of it will work fine in R800 mode too. Just try to find a CHGCPU program in our downloads database, and start experimenting...
|
But anyone know how CPU switch works? During program execution?! How can do it?
Should they freeze the other cpu and enable the r800 at the same PC address it was executing code the old z80?
|
CPU switching is actually fairly simple. When the turbo R changes CPUs, the CPU in question is simply halted. It'll keep whatever values are in it's registers, which includes the PC. Since only the BIOS usually switches CPU's, "the other" CPU will therefor always resume whatever it was it was doing at the moment after the last OUT was sent to the S1990. In case of the BIOS this means fetching the stack pointer and 'restoring' all the register values of "the previous" CPU. The phun part about this, is that it should be fairly easy to create a small program that'll allow the turbo R to run two different threads. While the threads wouldn't actually execute at the same time, it would still be possible to maintain two completely different register sets. Basically you could just switch from one CPU (and thus thread) to the other using just a few OUTs. I've often thought about using this trick to access the VDP on the turbo R, which is done terribly slow in R800 mode. Anyhoo, there should be some practical purpose for this phenomenon, tho the parallelism might also introduce a few new problems. I never really got around to testing how long the CPU switch actually takes, but I doubt it takes a whole lot of time. Maybe phun to explore this some day, but for now I want to keep my unfinished projects stack at it's already ridiculously high level...  |
|
Sonic_aka_T
 msx guru Berichten: 2261 | Geplaatst: 08 September 2006, 00:53   |
Quote:
| Quote:
| The CPU switch works by calling BIOS address #180 with CPU mode in register A. The PC is not actually transferred from CPU to another, but because the switching is done every time in same address in BIOS it does not matter as the other CPU remembers the same address from the past. (when it was swithced off) Both CPU's start from address 0 when they are powered up.
|
Actually, it does matter for the first switch. Only one cpu can run from 0 to the switch point. So the second should still be at 0.
|
The boot routine already takes care of this. By the time it has completed both CPU's will have halted at least once in the CHGCPU routine. |
|
Yukio msx professional Berichten: 778 | Geplaatst: 17 September 2006, 22:59   |
Ok , let's see if I understood.
Starting the Turbo R without disk = MSX-BASIC in Turbo mode.
If the game ran too fast, popping a MSX-DOS disk when booting cause the
normal boot with less memory for BASIC programs.
Using MSX-DOS 2.30 = MSX-DOS in turbo mode with memory mapper, if
someone written SET EXPERT=ON [could be in the BAT file] most old
applications would work in MSX-DOS disks when in Turbo mode.
It is possible to fix or convert the old DOS and MSX-DOS disks to work with
MSX systems ...
It is possible to patch or convert old CP/M software for use with MSX computers.
This would make a affordable CP/M system. The original CP/M would be better suited to run CP/M applications!
|
|
|
|
|