openMSX icon indicating copy to clipboard operation
openMSX copied to clipboard

ToshibaFDC is not supporting HX-34

Open zeilemaker54 opened this issue 5 years ago • 112 comments

Implement register 7FF4 fully, to support the HX-34: 7FF4 b0 is the disk side select (r/w), b1 is motor on/off (r/w)

Currently 7FF4 has not readback and also b0 (side select) is not implemented See: https://sourceforge.net/p/msxsyssrc/git/ci/master/tree/diskdrvs/hx-34/driver.mac

zeilemaker54 avatar Apr 28 '19 11:04 zeilemaker54

What about the rest of the HX-34? Do we have enough info to create the config?

Op zo 28 apr. 2019 13:24 schreef zeilemaker54 [email protected]:

Implement register 7FF4 fully, to support the HX-34: 7FF4 b0 is the disk side select (r/w), b1 is motor on/off (r/w)

Currently 7FF4 has not readback and also b0 (side select) is not implemented

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openMSX/openMSX/issues/1157, or mute the thread https://github.com/notifications/unsubscribe-auth/ADAWXCXDQIHNJ3EFB7IEHWDPSWCQFANCNFSM4HI6JD3A .

MBilderbeek avatar Apr 28 '19 17:04 MBilderbeek

According to the files on the bluemsx site: BIOS 0000-7FFF slot 0 RAM 0000-FFFF slot 3-0, no memorymapper SUB 0000-3FFF slot 3-1 DISK 4000-7FFF slot 3-2 FIRM 4000-7FFF slot 3-3 (rs232 + wordprocessor) JIS1

zeilemaker54 avatar Apr 29 '19 07:04 zeilemaker54

Hi Benoit,

What is the source of the HX-34 config and ROMs on the bluemsx website? Are these clean dumps from the original machine?

Op ma 29 apr. 2019 09:22 schreef zeilemaker54 [email protected]:

According to the files on the bluemsx site: BIOS 0000-7FFF slot 0 RAM 0000-FFFF slot 3-0, no memorymapper SUB 0000-3FFF slot 3-1 DISK 4000-7FFF slot 3-2 FIRM 4000-7FFF slot 3-3 (rs232 + wordprocessor) JIS1

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openMSX/openMSX/issues/1157#issuecomment-487474970, or mute the thread https://github.com/notifications/unsubscribe-auth/ADAWXCUWQ3B2XKFLCPJRE4TPS2O3VANCNFSM4HI6JD3A .

MBilderbeek avatar Apr 29 '19 08:04 MBilderbeek

Hello Manuel!

These dumps were sent to me by a Japanese guy who contributed much in the past to provide good dumps and help, especially for the National and Panasonic machines.

They come indeed from the original machine. However, the firmware rom (megarom) is uncomplete. It has an unknown mapper and requires more research.

Probably, these roms (or very similar) can also be found in the HX-33, with exception for the disk rom of course.

Have a nice day!

Benoît

mars2000you avatar Apr 29 '19 08:04 mars2000you

About the mapper of the HX-34, it seems there is a register 07FFFH (slot 3-3). From what I have deducted from the firmware: b7 unknown, something related with interrupthandling b6 unknown b5 unknown b4 seems to be unused b3 seems to be unused b2 seems to be unused b1 and b0 rom segment select

zeilemaker54 avatar Apr 29 '19 17:04 zeilemaker54

But about the Toshiba FDC, I think the diskrom of the HX-34 could be also the diskrom of the double sided HX-F101 version. Because of the version strings of both roms: HX-F101 TSDFDD001 04Apr85 HX-34 TSDFDD002 10Aug85 Both roms have the name of the programmer: Yasuo Shimizu ( HS dev. HSA group )

zeilemaker54 avatar Apr 29 '19 17:04 zeilemaker54

A little precision: according my Japanese source, the firmware rom in HX-33 and HX-34 is not exactly a megarom but a ROM with an unusual size (and mapper): 80kB, that consists of

  • 16kB RS-232C and printer features
  • 32kB Japanese Word Processor (CALL JWP)
  • 32kB English Word Processor (CALL EWP)

mars2000you avatar May 02 '19 07:05 mars2000you

mars2000you schreef op 2019-05-02 09:36:

A little precision: according my Japanese source, the firmware rom in HX-33 and HX-34 is not exactly a megarom but a ROM with an unusual format (and mapper): 80kB, that consists of

  • 16kB RS-232C and printer features
  • 32kB Japanese Word Processor 'CALL JWP)
  • 32kB English Word Processor (CALL EWP)

-- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [1], or mute the thread [2].

Links:

[1] https://github.com/openMSX/openMSX/issues/1157#issuecomment-488578215 [2] https://github.com/notifications/unsubscribe-auth/AL6BGC54ZT7TMAY3WUXHRQDPTKKYRANCNFSM4HI6JD3A Part of the mapper is also a 2K SRAM. From the partial dump I have, I could see at least 4 segments of 16KB being used by inspecting the code. But pictures from the HX-33 PCB shows 2 TC531000P ROMs, which are 128KB each. As this machine has JIS1, one of the ROMs would be the JIS1 ROM, and the other for system ROMs and firmware. MSX2 system ROM is 48KB, leaves 80KB max for firmware. Does your source own a HX-33 ? If so,we could create a small program to dump the roms using the 7FFFH register.

zeilemaker54 avatar May 02 '19 08:05 zeilemaker54

Unfortunaly I have no more contact with my Japanese source (it was a few years ago).

mars2000you avatar May 02 '19 09:05 mars2000you

So, did I understand correctly we cannot emulate the HX-34, at least due to a missing ROM dump?

@zeilemaker54 the readback of 7FF4, which bits does it return? Just b0 and b1 as you described?

MBilderbeek avatar May 05 '19 12:05 MBilderbeek

Manuel Bilderbeek schreef op 2019-05-05 14:26:

So, did I understand correctly we cannot emulate the HX-34, at least due to a missing ROM dump?

@zeilemaker54 [1] the readback of 7FF4, which bits does it return? Just b0 and b1 as you described?

-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [2], or mute the thread [3].

Links:

[1] https://github.com/zeilemaker54 [2] https://github.com/openMSX/openMSX/issues/1157#issuecomment-489421815 [3] https://github.com/notifications/unsubscribe-auth/AL6BGCZ2LJAYYIV2XZZT4RDPT3HARANCNFSM4HI6JD3A

Hi Manuel,

Yes, correct. We need a correct dump of a HX-33 or HX-34 firmware to correctly emulate the wordprocessor firmware. I could write a program to dump the firmware correctly, but we need the real hardware for this.

Also the build-in MSX-serial need some extra hardware emulation to function correctly:

C.4075: IN A,(82H) ; read MSX serial system status register BIT 3,A ; reserved bit 3 should be '1' RET Z ; nope, quit MSX serial INIT LD A,0FEH ; enable RxReady interupt, reserved bits 7-4 '1'. Where does reserved bit 3 respond to ? Write to 82H ? Or one of the reserved bits ? OUT (82H),A ; write MSX serial interrupt mask register IN A,(82H) BIT 3,A ; reserved bit 3 should be '0' RET NZ ; nope, quit MSX serial INIT

But the FDC emulation could be extended already to support the extra register bits of 7FF4. That are the indeed the read and write functions of the 7FF4 register as described.

Regards, Arjen

zeilemaker54 avatar May 06 '19 07:05 zeilemaker54

@zeilemaker54

Regarding the HX-33... Werner Kai has this machine... I made a draft openMSX config of it and this is what I had in my notes:

  <!-- based on information provided by Werner Kai's machine with serial 100158
       CPU: Sharp lh0080A Z80A-CPU-D
       PSG: Yamaha YM2149F
       There seem to be engine-like chips on the mobo:
       - TCX-2001
       - TCX-2002
       PPI: could be the TCX-1009?
       There is 2kB SRAM on the mobo. It seems to map to slot 3-3
       Reverse engineering by GuvyeR800/BiFi:
       0x7FFF in slot 3-3 might be some kind of control register:
       - bit 7: firmware switch?
       - bit 5/6: switch ROm/SRAM in page 2?

       the machine has a button left of the STOP button which says "COPY"

       -->

He and FRS also posted some of this here: https://www.msx.org/forum/msx-talk/hardware/internal-several-msx-computers-canon-v-8-v-10-v-20-toshiba-hx-33-yashica-yc-

MBilderbeek avatar May 11 '19 21:05 MBilderbeek

FYI: Wouter implemented the missing features of the Toshiba FDC in b5ed0f30fca76a9f35ea98c132d118eb47c8c0f6

MBilderbeek avatar May 14 '19 19:05 MBilderbeek

Snel gedaan zeg!

Groet, Arjen

Manuel Bilderbeek schreef op 2019-05-14 21:55:

FYI: Wouter implemented the missing features of the Toshiba FDC in b5ed0f3 [1]

-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [2], or mute the thread [3].

Links:

[1] https://github.com/openMSX/openMSX/commit/b5ed0f30fca76a9f35ea98c132d118eb47c8c0f6 [2] https://github.com/openMSX/openMSX/issues/1157?email_source=notifications&email_token=AL6BGC6DZ4N3HN3H6432S6TPVMKMHA5CNFSM4HI6JD3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVMTMMI#issuecomment-492385841 [3] https://github.com/notifications/unsubscribe-auth/AL6BGC5I5JWJRWJXGPY43ZLPVMKMHANCNFSM4HI6JD3A

zeilemaker54 avatar May 16 '19 11:05 zeilemaker54

@zeilemaker54 I found someone with a real HX-34. Are you still willing to write a ROM dumping program for it?

MBilderbeek avatar Mar 30 '20 20:03 MBilderbeek

I already did write a program to dump the rom. Attached is the MAC file (renamed as TXT) to create the MSX-DOS COM file. It is untested on the real thing.

hx3xdump.txt

zeilemaker54 avatar Apr 02 '20 17:04 zeilemaker54

@zeilemaker54 Looks like we have found a volunteer. Can you make sure he gets a binary of the dumping program? See https://www.msx.org/forum/msx-talk/hardware/hx-34-memory-upgrade?page=2#comment-395739 (popolon)

MBilderbeek avatar Dec 24 '20 15:12 MBilderbeek

Hello Manuel,

Here is the dump program, including the source file. It is a MSXDOS 1 program, I am not sure this will work in a MSXDOS 2 environment.

hx3xdump.zip

Regards,

Arjen

zeilemaker54 avatar Dec 24 '20 15:12 zeilemaker54

@MBilderbeek @zeilemaker54 The dump from hx34 can be found here: https://github.com/popolonx/MSX_STUFF/blob/main/HX34_FIRMWARE.ROM

popolonx avatar Dec 25 '20 15:12 popolonx

@popolonx Thanks! @zeilemaker54 The dump has very strange patterns of repeating blocks... If you look at it from a 16kB block perspective, you see this pattern: 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 4 5 6 7 4 5 6 7 4 5 6 7 4 5 6 7 It suggests there is 128kB of ROM, but also that there is some kind of mistake in the dumping program. What do you think?

When splitting it up in 8kB blocks, I see 13 different blocks. So I think that makes more sense anyway. This is what you get then: 0 1 0 2 0 3 0 4 0 1 0 2 0 3 0 4 0 1 0 2 0 3 0 4 0 1 0 2 0 3 0 4 5 6 7 8 9 a b c 5 6 7 8 9 a b c 5 6 7 8 9 a b c 5 6 7 8 9 a b c

MBilderbeek avatar Dec 25 '20 21:12 MBilderbeek

@MBilderbeek: No the dump is ok.

; Firmware is in slot 3-3, RAM in in slot 3-0 ; 7FFF is mapper ; ; x11xxxxx select SRAM in page 2 (8000H-87FFH) ; x00xxxxx select ROM in page 2 ; xxxxxx00 select ROM segement 0 in page 2 (screencopy, japanese wordprocessor) ; xxxxxx01 select ROM segement 1 in page 2 (japanese wordprocessor) ; xxxxxx10 select ROM segement 2 in page 2 (european wordprocessor) ; xxxxxx11 select ROM segement 3 in page 2 (japanese wordprocessor)

; kxxxxxxx COPY key

The dump program selects segments 0-15 in page1 and dumps those, then segments 0-15 in page 2 and dumps those. But from the dump it is now certain that only b1 and b0 are segement selects (hence the patron 0,1,2,3). But the segment select only works for page 2 and page 1 has a static ROM content. So if you spilt the file in 16 KB parts, part 0,16,17,18,19 (0 based) are the ROM firmware. So the firmware is 16KB+64KB = 80KB

zeilemaker54 avatar Dec 26 '20 09:12 zeilemaker54

@MBilderbeek @zeilemaker54 I dumped that mask ROM that was in socket: https://github.com/popolonx/MSX_STUFF/blob/main/Toshiba_HX34/HX24_ROM_IN_SOCKET.ROM

popolonx avatar Dec 28 '20 10:12 popolonx

@popolonx Thanks. Exactly what I suspected: 32 KB ROM BIOS+BASIC (2.0) 16 KB SUBROM 16 KB RS232+TOSHIBA extensions (slot 3-0, page 1) 64 KB WORDPROCESSOR (slot 3-0, page 2, controlled by mapper at 7FFF)

The other mask ROM in HX34 is the JIS1 ROM (also 128 KB sized)

@MBilderbeek: With this info and the info I already deducted, the TCX 200x mapper could be supported in openMSX. Please note also the behavior of bit 3 I/O 082H I already mentioned to get the RS232 working

zeilemaker54 avatar Dec 28 '20 11:12 zeilemaker54

@zeilemaker54 perhaps I missed it, but can you please give me (again) the details on the "bit 3 I/O 082H" for the RS232?

MBilderbeek avatar Dec 28 '20 16:12 MBilderbeek

@zeilemaker54 Also, any idea what can be read from the register at 0x7FFFH? Only that COPY key bit which indicates it is pressed? Also, is the 2kB SRAM only visible in 8000H-87FFH, or mirrorred all over page 2?

MBilderbeek avatar Dec 28 '20 17:12 MBilderbeek

@zeilemaker54 perhaps I missed it, but can you please give me (again) the details on the "bit 3 I/O 082H" for the RS232?

Not sure about the behavior (may be @popolonx can test this on the real thing), but it seems: OUT &H82,&HFF PRINT INP(&H82) AND &H8 OUT &H82,&HFE PRINT INP(&H82) AND &H8 should result in 0 8

I think this will only work if the special RS232 hardware adapter is installed. I think is done this way because the RS232 ROM is permanent, and the RS232 hardware is optional. By this behaviour, the installation of the RS232 hardware can be tested. And RS232 ROM support is only enabled if the RS232 hardware is found.

zeilemaker54 avatar Dec 28 '20 19:12 zeilemaker54

@zeilemaker54 Also, any idea what can be read from the register at 0x7FFFH? Only that COPY key bit which indicates it is pressed? Also, is the 2kB SRAM only visible in 8000H-87FFH, or mirrorred all over page 2?

read back from 7FFFH: b7 = copy key, 0 is pressed b6,b5 = SRAM select, read back b6,b5 written. Only pattern 00 and 11 are used, not sure what pattern 01 and 10 do b1,b0 = ROM segment select, read back b1,b0 written. I assume SRAM is only visible in page 2, because the ROM segment select is also for page 2 only

zeilemaker54 avatar Dec 28 '20 19:12 zeilemaker54

I mean, there's 2kB SRAM and there's 16kB page 2. So where in page 2 is it visible? Only in 8000H-87FFH, or mirrored all over page 2?

MBilderbeek avatar Dec 28 '20 20:12 MBilderbeek

@zeilemaker54 perhaps I missed it, but can you please give me (again) the details on the "bit 3 I/O 082H" for the RS232?

Not sure about the behavior (may be @popolonx can test this on the real thing), but it seems: OUT &H82,&HFF PRINT INP(&H82) AND &H8 OUT &H82,&HFE PRINT INP(&H82) AND &H8 should result in 0 8

I think this will only work if the special RS232 hardware adapter is installed. I think is done this way because the RS232 ROM is permanent, and the RS232 hardware is optional. By this behaviour, the installation of the RS232 hardware can be tested. And RS232 ROM support is only enabled if the RS232 hardware is found.

Can you explain what exactly is on port 0x82? I mean, which bit is doing what when written and when read?

MBilderbeek avatar Dec 28 '20 20:12 MBilderbeek

@MBilderbeek @zeilemaker54 I dumped that mask ROM that was in socket: https://github.com/popolonx/MSX_STUFF/blob/main/Toshiba_HX34/HX24_ROM_IN_SOCKET.ROM

@popolonx Thanks a lot! For reference, can you tell me which IC number this is according to the PCB? I can't read it on your pictures.

MBilderbeek avatar Dec 28 '20 20:12 MBilderbeek