Difference between revisions of "ASCII-EX mapper"
From MSX Game Library
(→Alternative) |
|||
Line 59: | Line 59: | ||
=== Alternative === | === Alternative === | ||
− | If the impact of a segment change in a bank is critical, an alternative would be to use the addresses of the odd and even mapper to access the 2 bytes of the register. In this way, it would be sufficient to write a 16-bit value to address 6000h, to change the 2 bytes of the segment register of the first bank. | + | If the impact of a segment change in a bank is critical, an alternative would be to use the addresses of the odd and even mapper to access the 2 bytes of the register. In this way, it would be sufficient, for example, to write a 16-bit value to address 6000h, to change the 2 bytes of the segment register of the first bank at once. |
+ | The minimum cost with direct access would then be 17 t-states instead of 28 with the proposed configuration. On the other hand, we risk losing compatibility with games that use odd addresses for segment changes. | ||
+ | ; Direct access | ||
+ | LD (nn),HL ; 17 t-states | ||
+ | |||
+ | ; Indirect access | ||
+ | LD HL,nn ; 11 t-states | ||
+ | LD (HL),E ; 8 t-states | ||
+ | INC HL ; 7 t-states | ||
+ | LD (HL),D ; 8 t-states | ||
+ | |||
+ | === MSXgl === | ||
+ | |||
+ | MSXgl uses macros to encapsulate bank switching mechanisms. It would therefore be totally transparent for a user to switch from an ASCII8 or even Konami-SCC mapper, to an ASCII-EX8 mapper. | ||
[[Category:Proposal]] | [[Category:Proposal]] |
Revision as of 13:17, 23 November 2023
Here's a proposal for a mapper format operating with a 16-bit segment register and allowing ROMs of up to 512 MB (8 KB segment) or 1 GB (16 KB segment).
A 16-bit segment register may allow to select one of the 65536 segments for each memory bank.
The idea is to use the ASCII8/16 mapper format for the low byte of the segment register and to use the 8000h~9FFFh memory space unused by ASCII to manage the high byte. This way, we could build hardware capable of running standard ASCII8/16 ROMs in addition to the new 16-bit format.
Detection by emulators should be fairly easy (counting ROM write accesses).
Below, the parts in blue are the only additions to the standard ASCII8/16 format.
Contents
ASCII-EX16 mapper
Bank (16kB) | Switching address | Initial segment |
---|---|---|
4000h~7FFFh (mirror: C000h~FFFFh) | Lower byte: 6000h (mirrors: 6001h~67FFh) Higher byte: 8000h (mirror: 8001h~87FFh) |
0000h |
8000h~BFFFh (mirror: 0000h~3FFFh) | Lower byte: 7000h (mirrors: 7001h~77FFh) Higher byte: 9000h (mirror: 9001h~97FFh) |
0000h |
- Maximum number of segment: 65536
- Maximum size: 1 GB (1024 MB)
ASCII-EX8 mapper
Bank (8kB) | Switching address | Initial segment |
---|---|---|
4000h~5FFFh (mirror: C000h~DFFFh) | Lower byte: 6000h (mirrors: 6001h~67FFh) Higher byte: 8000h (mirror: 8001h~87FFh) |
0000h |
6000h~7FFFh (mirror: E000h~FFFFh) | Lower byte: 6800h (mirrors: 6801h~6FFFh) Higher byte: 8800h (mirror: 8801h~8FFFh) |
0000h |
8000h~9FFFh (mirror: 0000h~1FFFh) | Lower byte: 7000h (mirrors: 7001h~77FFh) Higher byte: 9000h (mirror: 9001h~97FFh) |
0000h |
A000h~BFFFh (mirror: 2000h~3FFFh) | Lower byte: 7800h (mirrors: 7801h~7FFFh) Higher byte: 9800h (mirror: 9801h~9FFFh) |
0000h |
- Maximum number of segment: 65536
- Maximum size: 512 MB
Misc
Naming
If the ASCII-EX (extended ASCII) name poses any legal issue, we could simply called those mappers EX8 and EX16.
Bank switching cost
The cost of switching only the lower or higher byte of the 16-bit segment register is the same that switching segment for standard ASCII mappers.
; Direct access LD (nn),A ; 14 t-states ; Indirect access LD HL,nn ; 11 t-states LD (HL),A ; 8 t-states
Although a program can avoid having to change the 2 bytes of the segment register at once, there are cases where this may be necessary. In such cases, the cost is doubled, but remains reasonable.
Alternative
If the impact of a segment change in a bank is critical, an alternative would be to use the addresses of the odd and even mapper to access the 2 bytes of the register. In this way, it would be sufficient, for example, to write a 16-bit value to address 6000h, to change the 2 bytes of the segment register of the first bank at once.
The minimum cost with direct access would then be 17 t-states instead of 28 with the proposed configuration. On the other hand, we risk losing compatibility with games that use odd addresses for segment changes.
; Direct access LD (nn),HL ; 17 t-states ; Indirect access LD HL,nn ; 11 t-states LD (HL),E ; 8 t-states INC HL ; 7 t-states LD (HL),D ; 8 t-states
MSXgl
MSXgl uses macros to encapsulate bank switching mechanisms. It would therefore be totally transparent for a user to switch from an ASCII8 or even Konami-SCC mapper, to an ASCII-EX8 mapper.