I did some testing with it
out &h40,8 print inp(&h40)
returns 247 (inverted 8) on FX, WX and WSX. On other tried systems it returns 255
Some MSX1s and few MSX2s can return a random value (value depending on the hardware design).
Not if you first get a 2 from 2DH. That will narrow it down to only those three computers.
Can’t seem to figure out how to upload it to the wiki (it is too modern for MSX user and to old school for modern PC user)
https://www.msx.org/wiki/Main_Page
See the “Upload file” link in the “Toolbox” section on the right.
Can’t seem to figure out how to upload it to the wiki (it is too modern for MSX user and to old school for modern PC user)
Picture added to the AVT-200 page
Not if you first get a 2 from 2DH. That will narrow it down to only those three computers.
Nope. This will also return 247 on some of the later Sanyo models. Notably the PHC-70FD and PHC-70FD2. There might be others.
Rats... Didn't check that one...
I received the source, for those interested:
in a,(40H) cpl push af ld a,8 out (40H),a ; Factorycode 8 (Panasonic) to I/O port 40h in a,(40H) ; read back value cpl ; invert all bits cp 8 ; if value is not the same jr nz,NotWx ; Then it's not a FX/WX/WSX xor a ; send 0 to I/O port 41h out (41H),a ; set 5,37MHz mode (1 is go back to 3,57MHz) NotWX: pop af out (40H),a
I do not have any asm skills so don't ask me questions
That routine is good. One should never set expanded I/O ports 41H-4FH without first setting the appropriate device ID to 40H and checking if it is present (reading back the complement), and one should always restore the existing selection after modification (especially on interrupt handlers and hooks).
Although instead of:
xor a ; send 0 to I/O port 41h out (41H),a ; set 5,37MHz mode (1 is go back to 3,57MHz)
I would only modify the appropriate bit:
in a,(41H) ; get current value of I/O port 41h res 0,a ; reset bit 0 (=5.37 MHz) (set for 3,57MHz) out (41H),a ; apply changed value
And yes be aware that although Sanyo MSX2+es do expose the flag, and I think the turboR as well, it’s not hooked up, so (re)setting it has no effect on their CPU speed.
About the AVT DPC-200: the Wiki article on the machine says it's released in 1985 but the AVT category article says 1984... which is the real year?
Also, I doubt that ECC had something to do with the DPC-200. It looks like AVT worked a bit with ECC (for example for disk ROMs), but that seems about it. I don't think they had something to do with the MSX models. What do you think?