OUT &H41,154 on Panasonic FS-A1WX

Pagina 1/2
| 2

Door rderooy

Paladin (686)

afbeelding van rderooy

06-02-2020, 15:55

In an old Japanese MSX Magazine (1989-04, page 133) there is a small blurb about typing "OUT &H41,154" in BASIC on the A1WX. It is supposed to have some kind of funny effect apparently. They don't really explain it, just telling you to try it.

I tried it in openMSX, but did not see any effect. Perhaps it does something on a real machine. Does anyone know?

https://issuu.com/msxblog/docs/msx_magazine_1989_04

Aangemeld of registreer om reacties te plaatsen

Van meits

Scribe (6530)

afbeelding van meits

06-02-2020, 16:05

Just tried it on an FX and it does nothing. Will try its younger sisters later today.

Edit:
It does something (on the FX and WSX as well). It puts the machine in turbo mode.

Van rderooy

Paladin (686)

afbeelding van rderooy

06-02-2020, 16:24

Thanks Meits. I would have expected the turbo LED indicator in openMSX to turn on, but it does not. But running "machine_info z80_freq" in the command window shows it running at the higher frequency afterwards.

Van lintweaker

Champion (455)

afbeelding van lintweaker

06-02-2020, 16:24

Normally you would have to manipulate port 40h first before using (able to) use port 41h to set or reset turbo speed.

Van mars2000you

Enlighted (6428)

afbeelding van mars2000you

06-02-2020, 16:40

The only correct procedure is described in the Wiki:

https://www.msx.org/wiki/Panasonic_FS-A1WX#CPU_Turbo_mode

(also for the other Panasonic MSX2+)

Van meits

Scribe (6530)

afbeelding van meits

06-02-2020, 17:01

The one in the wiki is a bit over the top imho.

Van Grauw

Ascended (10699)

afbeelding van Grauw

06-02-2020, 19:38

The IF PEEK is unnecessary, but the rest is correct due to the way expanded (switched) I/O ports work.

OUT &H40,8:IF INP(&H40)=247 THEN OUT &H41,128  ' Activating 5.37 MHz Mode
OUT &H40,8:IF INP(&H40)=247 THEN OUT &H41,129  ' Deactivating 5.37 MHz Mode

See http://map.grauw.nl/resources/msx_io_ports.php#expanded_io

The value 154 used in MSX Magazine 1989-04 page 133 is strange though, it also sets bits 4, 3 and 1 of which no function is known. Maybe someone just tried a random value in absence of official documentation? Or maybe there are functions which are not yet discovered.

Van Pac

Scribe (6956)

afbeelding van Pac

06-02-2020, 19:10

I always typed just the OUT commands. What is the purpose of the IF condition?

Van Grauw

Ascended (10699)

afbeelding van Grauw

06-02-2020, 19:48

Not outputting a value when the Panasonic expanded I/O port is not found. See the documentation I linked. Of course if you just type it on the machine you don't need to do it, but if you use it in a program it is good practice to not output values to ports that you know aren't present.

Though in this case it's not actually problematic because no device should be listening to a manufacturer / device ID that it doen't support. But just the bare OUT &H41 is definitely not ok. The IF INP(&H40) is optional but good practice. The IF PEEK(&H2D) is superfluous and potentially even prevents an MSX2 with turbo circuit mod that's listening to this port from working. Only 1chipMSX currently does that afaik and it identifies as MSX2+, but someone could make a turbo mod like that for MSX / MSX2 in the future.

Van Pac

Scribe (6956)

afbeelding van Pac

06-02-2020, 19:14

Now clear... Wink

Van Grauw

Ascended (10699)

afbeelding van Grauw

06-02-2020, 19:49

What does OUT&H40,8:?INP(&H41) return by default? 155?

Pagina 1/2
| 2