Acid2Test help

Page 2/2
1 |

By sd_snatcher

Prophet (3044)

sd_snatcher's picture

19-04-2019, 17:23

@santiontanon

I just tested Xracing on an emulated National CF-1200 (16KB of RAM), and it seems to work fine. But you mentioned that you used RAM on 0000h~3FFFh. How does your code behave on with machines that only have 16KB of RAM?

EDIT: Ah, ok. It uses ROM and not RAM on 0000h~3FFFh. So, indeed it's just the frame-0 switching that is the cause of the problem.

Well, in this case I have to go into some details on the hardware side: There's another reason why there were no 48KB plainROM games back then: This is not a standard EPROM size. So such size is pretty much something that only exists in the emulation world.

To implement a 48KB ROM cartridge in real hardware, you would have to resort to one of the following approaches:

1) Add extra glue-logic to decode the addresses between two EPROMs: one with 32KB and another with 16KB. Now, this would cost as much as a MegaROM without the same benefits. So everyone went to the MegaROM way.

2) Use a single 27C512 EPROM (64KB), and waste 16KB of it. So, why not make a 64KB game anyway? But since handling plainROMs bigger than 32KB is cumbersome, everyone just went the MegaROM way.

3) MegaROM: fully compatible with everything, way more flexible and allows bigger ROM sizes. It's a win-win situation.

By santiontanon

Paladin (820)

santiontanon's picture

19-04-2019, 18:08

Right, right, only 16KB of RAM. So, it's just 48KB ROM. I guess it's using the "64KB ROM wasting 16KB of it" method you mention above. MegaROM seems like an attractive for larger projects, but that was not allowed for the MSX classic category, so, not an option Smile

But in any case, I wanted to limit the size to 48KB just to set a personal limit (otherwise, the game never gets finished, hahaha).

But ok, so, the problem is this 48K thing, I guess I'll have to live with the potential incompatibility then Smile

By sd_snatcher

Prophet (3044)

sd_snatcher's picture

19-04-2019, 18:24

Yes, it's just a dilemma of what are the set restrictions one want to follow. Sometimes, sets of restrictions will conflict with each other and you'll have to chose which path you'll take. Smile

Like, back then, the cassette games that decided to use more RAM than it would be available with a disk controller. It was the same as to decide that the game won't be compatible with disks.

As a suggestion for the MSXdev team, maybe some tune up of the next year "classic" rules to avoid configurations that could lead to compatibility problems. They already seem to have discarded 64KB ROMs exactly because of that.

By Manel46

Champion (425)

Manel46's picture

19-04-2019, 21:24

sd_snatcher
I can not do the test that you say since after securing Z80 and 60 Hz, I connect page 0 of ram, to put the player opl4. The rom is not started.
Thank you anyway.

By Manuel

Ascended (15680)

Manuel's picture

20-04-2019, 23:00

santi/sd_snatcher: can you tell me what is going on now? Why isn't the game running on Acid2Test config? It's not clear to me.

By sd_snatcher

Prophet (3044)

sd_snatcher's picture

20-04-2019, 23:59

In a nutshell, there are some restrictions that the standard will allow user software to do. Amongst them is to directly access the I/O ports. And the BIOS ENASLT function doesn't allow the frame-0 to be switched. As a corollary, user software are not allowed to switch the frame-0.

On a 2nd thought, Santi, RDSLT could be used to read data from the ROM at the frame-0 without breaking the rules. But I don't know if the performance impact would be too big for your case. Would you like to try it?

By santiontanon

Paladin (820)

santiontanon's picture

21-04-2019, 05:27

@Manuel: yes, it's what sd_snatcher said. XRacing kicks the BIOS out of page 0 for brief periods of time some times. And that is what causes the incompatibility with the Acid2Test. Basically what I do is:
- swap the BIOS out of page 0, to be able to read from the cartridge addresses #0000 - #3fff
- call Pletter to decompress something from there onto RAM (the only thing that I keep in the page 0 of ROM is compressed data)
- put the BIOS back

The routines I use to swap the page 0 have been tested in many games, and are not my own (as credited in the source code, they were written by Konamiman, and I obtained them from here: http://www.z80st.es/downloads/code/ ). But I guess they are not as robust as for passing the Acid2Test :)

But @sd_snatcher, I would definitively like to try what you suggest! I only read from that page in 2 points: right before the main menu, and right before a race starts (to decompress the menu title data, and the track maps). So, a small pause there I think should be fine (as long as I manage to keep it under 1 second or so). I'll play around with it, I wasn't aware of that BIOS function!!! I hope i's not too slow hehehe :)

By Manel46

Champion (425)

Manel46's picture

21-04-2019, 14:49

These are very good sources of z80st.
I have programmed 48kb roms, with them.

Page 2/2
1 |