System variables (again!)

صفحة 2/4
1 | | 3 | 4

بواسطة Bengalack

Paladin (747)

صورة Bengalack

14-05-2022, 07:57

Great insight here! Thanks. But... if you are not using BIOS, and use your own ISR, and you never return from your program until there is a reset(as is it a rom/cartridge), I can't see how the ram "hi-jacking" affects anything. If there is a problem with this approach, it is the choice of not using BIOS-calls. This may cause future incompatibility... which is a fun thing to discuss regarding a retro-machine Smile Yes, I know about Nishi's latest works... 30 years later Smile

بواسطة Micha

Expert (103)

صورة Micha

14-05-2022, 11:11

Bengalack wrote:

If there is a problem with this approach, it is the choice of not using BIOS-calls.

Are there actually any machines that don't use the "standard" ports for the VDP, PSG, keyboard and joysticks? Is there an overview or a list on this?

And the other way around: how much software/games are out there that handle hardware directly without using BIOS calls ?

بواسطة Bengalack

Paladin (747)

صورة Bengalack

14-05-2022, 17:22

Micha wrote:
Bengalack wrote:

If there is a problem with this approach, it is the choice of not using BIOS-calls.

Are there actually any machines that don't use the "standard" ports for the VDP, PSG, keyboard and joysticks? Is there an overview or a list on this?

Other people here know this area better, but AFAIK there is this, and the like: https://www.msx.org/wiki/Neos_MA-20

بواسطة Bengalack

Paladin (747)

صورة Bengalack

03-07-2022, 10:31

Micha wrote:

If you do have your own ISR and you don't use BIOS calls and you have all other interrupts disabled then it should be safe to use F380-FFFE...

What "all other interrupts"? I'm on IM1, and purely running my own code on 0038h.

بواسطة aoineko

Paladin (1002)

صورة aoineko

03-07-2022, 14:16

If you use you own ISR and don't use BIOS routines you can use all the RAM freely (except FFFFh).
In your boot code, you can backup the usefull BIOS information in your own RAM area.
For exemple, in the game Final Smash I backup: Version config (002B, 002C and 002D), EXPTBL (FCC1) and SLTTBL (FCC5).

بواسطة Metalion

Paragon (1625)

صورة Metalion

03-07-2022, 16:22

aoineko wrote:

If you use you own ISR and don't use BIOS routines you can use all the RAM freely (except FFFFh)

That's something I have a hard time understanding...
If there's no BIOS, who is using the address FFFFh ? And how ?
Only the Z80 access the RAM, and you have complete control over it when the BIOS is out.

بواسطة MsxKun

Paragon (1124)

صورة MsxKun

03-07-2022, 17:16

Metalion wrote:
aoineko wrote:

If you use you own ISR and don't use BIOS routines you can use all the RAM freely (except FFFFh)

That's something I have a hard time understanding...
If there's no BIOS, who is using the address FFFFh ? And how ?
Only the Z80 access the RAM, and you have complete control over it when the BIOS is out.

The $FFFF address is not RAM, it's a port. Like $A8, $98 and so on... To be exact: $FFFF = Secondary slot select register
So we were fooled. A 64kb MSX doesn't have 64kb of RAM, it has 64kb - 1 byte Crying

بواسطة aoineko

Paladin (1002)

صورة aoineko

03-07-2022, 19:16

@Metalion An expanded slot have a special hardware mechanism to handle address FFFFh. In this case, this address don't point to slot/sub-slot content but to a register to read/write sub-slot number.

For me, It's a very strange choice made by MSX creators, especially since the main slot goes through an I/O address.
I guess they had a good reason to do that back then. ^^

BTW, If you are sure your page #3 RAM is in a non-expanded slot, you may use this FFFFh address as normal RAM.
But the code to check if you can use this address is not worth to gain only 1 byte.

بواسطة ARTRAG

Enlighted (6935)

صورة ARTRAG

03-07-2022, 20:08

The choice of having mapped in ram the secondary slot register was terrible and caused plenty of problems to coders, to users and even to hw manufacturers (IIRC some early disk roms do not handle the secondary slot register correctly).

بواسطة Metalion

Paragon (1625)

صورة Metalion

03-07-2022, 21:27

MsxKun wrote:

The $FFFF address is not RAM, it's a port. Like $A8, $98 and so on...

OK, I understand now.
So it's like the SID and VIC-II register addresses of the C64, that you address directly like they are in RAM.
Very strange choice, since every other MSX port is ... well, a port.

صفحة 2/4
1 | | 3 | 4