Save some settings?

صفحة 1/2
| 2

بواسطة DarkSchneider

Paragon (1030)

صورة DarkSchneider

10-02-2023, 18:10

I'd like to set a Philips on NTSC, as default is PAL. Set it with console command toggle_freq, but on exit it restores the PAL mode. Tried the save_settings but the freq is not saved.

Login أوregister لوضع تعليقاتك

بواسطة aoineko

Paragon (1137)

صورة aoineko

10-02-2023, 18:17

On real hardware the frequency is not save in the CMOS of the Real Time Clock (https://www.msx.org/wiki/Real_Time_Clock_Programming#Block_2).

If you speak about openMSX setting, I suppose you will have to create a custom virtual machine if you want a NTSC Philips machine.

بواسطة DarkSchneider

Paragon (1030)

صورة DarkSchneider

10-02-2023, 19:43

How can a custom machine be created on openMSX? I think all the XML stuff was made by catapult, as now without I cannot see any XML anywhere. Cannot find the way from bare openMSX.

بواسطة aoineko

Paragon (1137)

صورة aoineko

10-02-2023, 19:04

If you start openMSX with a command line you can probably force the VDP to be in 60 Hz mode.

بواسطة DarkSchneider

Paragon (1030)

صورة DarkSchneider

10-02-2023, 19:42

Yes but now I also want to store the extensions like the FMPAC. Tried with the store_machine, it creates a compressed xml.gz file, but now I don't know how to use it as loadable machine to set it as default, as currently have to restore_machine, activate_machine it, and then delete_machine of the starting one, a bit annoying.

بواسطة DarkSchneider

Paragon (1030)

صورة DarkSchneider

11-02-2023, 10:39

OK I am finally using this. Found the base XML in the openMSX install folder and created a new one. But cannot find the way to set PAL/NTSC in the XML.

بواسطة aoineko

Paragon (1137)

صورة aoineko

11-02-2023, 11:56

I looked at some XML but the frequency is not there.
I guess it is the BIOS used that determines if the machine is NTSC or PAL.

You could create a hybrid machine from a Philips MSX configuration and change the BIOS to one of a NSTC machine, but it wouldn't really be a « Philips » machine anymore.

The best thing would be to patch the BIOS of the machine you want to use.
Probably just change the value of bit #7 at address 002Bh in the BIOS and set it to 0.
Cf. https://map.grauw.nl/resources/msxsystemvars.php

For example, in the Philips NMS8250 BIOS's ROM you have 91h at address 002Bh (10010001b). Set it to 11h (00010001b) and (hopefully) the VDP should be initialized at 60 Hz.
But It will work only if the BIOS use this value to initialize the VDP and not just to tell the user what is its initial state.
It's possible that the BIOS store somewhere else the value sent to the VDP registers to initialize it.
In this case, you should have to patch also those values but I have no idea where they are located.

بواسطة wouter_

Hero (535)

صورة wouter_

11-02-2023, 11:57

Hi DarkSchneider,

Short answer: what you're asking isn't directly supported in openMSX. Easiest solution would be to use another MSX machine that does boot in NTSC mode by default. Or ask someone to hack the Philips ROMs to make it boot in NTSC mode, and then use those hacked ROMs in your emulated Philips machine.

Longer answer: the PAL/NTSC mode can freely be controlled by the running MSX software. When the MSX machine boots, it sets the initial mode. But any later MSX software can freely set another mode. OpenMSX has no option to force one specific mode.

OpenMSX does come with a toggle_freq Tcl script. That allows you to temporarily switch the mode. Nevertheless the MSX itself remains in full control (meaning: openMSX will not stop the MSX software from switching the mode back).

It is possible to write a more advanced Tcl script that e.g. sets the desired mode every second or so. And you could even make that script controllable via a (new) user defined setting that is stored on exit. Though I wouldn't recommend this: the above solutions are much simpler.

بواسطة Briqunullus

Paladin (768)

صورة Briqunullus

11-02-2023, 12:12

Assuming you're talking about a Philips MSX2 like the NMS8250, you'll need to patch 3 locations.
First like aoineko says, in the Bios/Basic rom, modify address 0x002b from 0x91 to 0x11. This doesn't change anything, it's just for identification. Then modify address 0x7bd7 from 0x02 to 0x00. This is the VDP patch routine that sets up PAL. The change will break that and keep NTSC. And finally, to be sure, in the subrom modify initial VDP values. On address 0x29ff modify from 0x02 to 0x00.

Off course you will need to redetermine sha1 values for your rom files. And keep in mind this will only modify the interrupt frequency. On real NTSC machines, values for e.g. keyboard repeat will be different as well. To achieve even better roms, assemble your own from msxsyssrc.

بواسطة DarkSchneider

Paragon (1030)

صورة DarkSchneider

11-02-2023, 12:58

OK thanks to everyone. Finally solved modifying the ROM files (it was a NMS8245). At first it didn't work until noticed that the machine 1st referenced the NMS8245SystemROM1.08.bin file, that seems to be a full 64KB dump, so when patching the sub-rom have to add 0x8000 to the address.

Another solution was to change the order in XML config so it to use the patched individual files nms8245_basic-bios2.rom and nms8245_msx2sub.rom, but it's fine to have that bin already patched anyway.

Now it works and have a NMS8245 at 60Hz, with 256KB RAM, and FMPAC in the (before) free 3-1 subslot.

The last thing is to add the IDE interface with HDD. Not sure if it is better to attach a slotexpander into slot-2 and then the IDE into a subslot, or change the slot-0 to expanded and attach it into a subslot there, as not sure if expanding the slot-0 is a good idea for compatibility (specially for old western software).

بواسطة aoineko

Paragon (1137)

صورة aoineko

11-02-2023, 13:16

Anyway it would be great to have an option in openMSX to set the default VDP frequency: A set_freq rather than toggle_freq. In MSXgl I setup target MSX according to project options but I have no easy way to setup frequency on this emulator (Emulicious for example have this kind of option).

صفحة 1/2
| 2