Schrijver
| turbo R support
|
BiFi msx guru Berichten: 3142 | Geplaatst: 30 April 2004, 23:10   |
Some ROMs are shadowed into RAM while the turbo R boots. The timing delay is done by the hardware.
|
|
flyguille msx master Berichten: 1202 | Geplaatst: 30 April 2004, 23:21   |
the mirror of the BIOS on DRAM is made automatically or need be done on the boot by software?
|
|
snout
 msx legend Berichten: 4991 | Geplaatst: 30 April 2004, 23:23   |
Automatically. The turboR rules for a reason, you know  |
|
Sonic_aka_T
 msx guru Berichten: 2268 | Geplaatst: 30 April 2004, 23:23   |
Okay... One more time... The Turbo-R has *three* CPU modes which can be changed by calling BIOS entry $0180 with in REG A:
%Lxxxxx00 Z80 MODE
%Lxxxxx01 R800 MODE (Also called R800 ROM MODE)
%Lxxxxx10 R800 DRAM MODE (Also called "Canuoudealwiththatkunbasic?" MODE)
Bit 7 controls wether the R800 led is set accordingly.
Now, as you may know, (cheap) RAM is faster than (cheap) ROM. This is also the case for the Turbo-R. This means that it has a special R800 DRAM MODE which copies all the BIOS/SYSTEM roms to RAM memory thus exchanging memory for speed. This may not seem like a big deal, but in BASIC you can really tell the difference. When in DRAM mode the engine (?) automatically blocks all write access to the segments in which the BIOS etc is stored. And that's it. Not much of a big deal, but it would be an advantage to have the MNBIOS do a similar trick. It too would save some speed.
How this is all hardwired, I don't know. You'd really need the technical docs and schematics to see, which as far as I know no-one has...  But, it works... Yeh!  |
|
snout
 msx legend Berichten: 4991 | Geplaatst: 30 April 2004, 23:27   |
Actually, there's a Z80 DRAM mode as well... but you need to perform some tricks to get into that mode  |
|
flyguille msx master Berichten: 1202 | Geplaatst: 30 April 2004, 23:35   |
so, if i support on the console command, a command like TURBO ON... than run that routine with A=2, that's all the needed to work?
copy to DRAM, you mean you use the main RAM memory?
anyway, i are confused, A=1 and A=2 do blocked the writing access ?
|
|
snout
 msx legend Berichten: 4991 | Geplaatst: 30 April 2004, 23:36   |
A=2 blocks writing access to that part of the memory that is used to shadow the ROM, which indeed consumes some RAM memory.
|
|
flyguille msx master Berichten: 1202 | Geplaatst: 30 April 2004, 23:39   |
how much without shadowing, how much shadowing?
|
|
Sonic_aka_T
 msx guru Berichten: 2268 | Geplaatst: 30 April 2004, 23:44   |
Quote:
| so, if i support on the console command, a command like TURBO ON... than run that routine with A=2, that's all the needed to work?
|
Well, I wouldn't make any TURBO ON command for compatibility' sake. But yes, if you were to make a command for MSX BASIC, all you would need to do is run this code with the appropriate register values. Ofcourse you would have to figure out how exactly the DRAM part is done. This is, I guess, somehow hardwired into the system. You would have to see how it would be possible to replace the original BIOS data with your MNBIOS data. I suggest you use an emulator for that part. I don't know if anyone has ever tried something like this, but I haven't.
Quote:
| copy to DRAM, you mean you use the main RAM memory?
|
Yep, the upper x pages of the MAIN RAM.
Quote:
| anyway, i are confused, A=1 and A=2 do blocked the writing access ?
|
Yes, like snout said, in R800 DRAM mode the pages to which the ROM is copied can no longer be accessed. You can try to write to them, but nothing will actually happen. This is only the case for R800 DRAM mode. In normal R800 mode the memory is all free like on any other MSX. |
|
Sonic_aka_T
 msx guru Berichten: 2268 | Geplaatst: 30 April 2004, 23:45   |
Quote:
| how much without shadowing, how much shadowing?
|
Don't know... Prolly the BIOS and the extended ROM. I'll try and see if I can find out somehow... I'll get back to you about that... |
|
Sonic_aka_T
 msx guru Berichten: 2268 | Geplaatst: 01 Mei 2004, 00:51   |
It seems to be the 4 highest pages of RAM. Both BIOS and BASIC ROMs are copied.
|
|
Sonic_aka_T
 msx guru Berichten: 2268 | Geplaatst: 01 Mei 2004, 01:21   |
Quote:
| the mirror of the BIOS on DRAM is made automatically or need be done on the boot by software?
|
I think the reset routine does the copying, but I'm not sure... What I don't know is if you can change the amount of segments (I checked, it's 4) can be changed somehow. |
|
BiFi msx guru Berichten: 3142 | Geplaatst: 01 Mei 2004, 08:17   |
You can't change that. There's always 64 KB at the top reserved for the following ROM's: - BIOS ROM (slot 0-0, page 0, copied to mapper page -4, $FC)
- BASIC ROM (slot 0-0, page 1, copied to mapper page -3, $FD)
- SUB-ROM (slot 3-1, page 0, copied to mapper page -2, $FE)
- KANJI BASIC ROM (slot 3-1, page 1, copied to mapper page -1, $FF)
Even though the KANJI BASIC ROM is 32 KB (page 1 and 2), only the first 16 KB is copied to RAM. |
|
BiFi msx guru Berichten: 3142 | Geplaatst: 01 Mei 2004, 08:25   |
Quote:
| >>anyway, i are confused, A=1 and A=2 do blocked the writing access ?<<
Yes, like snout said, in R800 DRAM mode the pages to which the ROM is copied can no longer be accessed. You can try to write to them, but nothing will actually happen. This is only the case for R800 DRAM mode. In normal R800 mode the memory is all free like on any other MSX.
|
Like snout said?!? Excuse me, but if you're that narrowminded to refer to posts just on the same page, then ehrm... never mind.
To correct things. You can also write the mapper pages used to mirror the ROM blocks in R800 ROM mode (A=1). Only when DRAM mode (either R800 DRAM or the tricksetable Z80 DRAM) is set, the system will write-protect those upper 4 blocks. |
|
BiFi msx guru Berichten: 3142 | Geplaatst: 01 Mei 2004, 08:36   |
Quote:
| How this is all hardwired, I don't know. You'd really need the technical docs and schematics to see, which as far as I know no-one has...  But, it works... Yeh! 
|
Even that's pretty simple to explain. There's a 4 MB-sized mapper in the MSX turbo R. In that mapper range there's all ROM (except for the KANJI FONT ROM), SRAM and RAM. You can access that complete range in slot 3-3. This slot is usually used by the internal software: MSX Word Processor and in the GT there's MSX-View. Since the RAM is covered by that mapper as well and the mapper having access (or at least, it seems that way) over several slots, it can change the particular pages containing either ROM or RAM to those particular slots and pages. |
|
|
|
|