Showing posts with label Kanji ROM. Show all posts
Showing posts with label Kanji ROM. Show all posts

Thursday, March 19, 2020

Panasonic Video Titler VW-KT300 - part 3


As I stated in a previous post, this blog was returning after a large pause. After showing a new device and a bit of history, nothing is more appropriate than summon an old and forgotten loose thread. And here we are.

Back in 2016, we take a look in Panasonic VW-KT300. We saw that it's a MSX2+ without a MSX-BIOS. The machine have a different BIOS, almost made from scratch. The disassembly of this BIOS confirmed to us that:

  • The NEC gate-array is some kind of MSX-Engine;
  • 64KB of RAM is a Memory Mapper;
  • There are routines to initialize PPI and PSG;
  • MSX's slots and pages structure is present;
  • VW-KT300 is an MSX based hardware.

With this information, Alexandre Tabajara from Tabalabs boots the Video Titler using a MSX1 BIOS, The video with this experience even shows the MSX Basic prompt. Further try outs to boot it, now as a MSX2+, proved to be very frustrating and eventually, I give up and did go to the next archaeological excavation.

Now and then I take the disassembled SYSTEM0 code, understand and comment a few lines, and put it back in the drawer. This week I toke the code to read again and, suddenly, saw something very obvious: the machine, hardware wise, is a Panasonic MSX2+, what the MSX2+ from Panasonic has in slot 3.3?

The Panasonic Mapper.

Sometimes the information is just in front of our eyes. In the 2016's post I wrote, frustrated:
The layout of SLOT3.3, with all pages mapped to EDIT0, is a clue that there is a custom mapper that needs to be configured somehow. 

"There is a custom mapper"... why not try the Panasonic one in a Panasonic machine?

For those unfamiliar with the Panasonic Mapper, it is used with few modifications in all MSX2+ and TurboR from Panasonic. It merges all MSX address spaces (RAM, ROMs, SRAM) in a big set with 512 segments of 8KB each. AFAIK this mapper is only present in the firmware slot: 3.3.

To select which segments are in each of the slot 3.3's pages, you need to write the desired segment number in a specific memory address for each page. To select which segments are in each of the slot 3.3's pages, you need to write the desired segment number in a specific memory address for each page, as you can see in the table below:

        +-------------+-------SEGMENT-SELECTION-------+
        |   ADDRESS   |  7FF8h  |    WRITE    | READ  |
+-------+-------------+---R/W---+-------------+-------+
| PAGE0 | 0000h~1FFFh |  bit 0  | 6000h~63FFh | 7FF0h |
|       | 2000h~3FFFh |  bit 1  | 6400h~67FFh | 7FF1h |
+-------+-------------+---------+-------------+-------+
| PAGE1 | 4000h~5FFFh |  bit 2  | 6800h~6BFFh | 7FF2h |
|       | 6000h~7FFFh |  bit 3  | 6C00h~6FFFh | 7FF3h |
+-------+-------------+---------+-------------+-------+
| PAGE2 | 8000h~9FFFh |  bit 4  | 7000h~73FFh | 7FF4h |
|       | A000h~BFFFh |  bit 5  | 7800h~7BFFh | 7FF5h |
+-------+-------------+---------+-------------+-------+
| PAGE3 | C000h~DFFFh |  bit 6  | 7400h~77FFh | 7FF6h |
|       | E000h~FFFFh |  bit 7  | 7C00h~7FEFh | 7FF7h |
+-------+-------------+---------+-------------+-------+
        | (1) Segment number have 9 bits (1+8)        |
        |      - most significant bit r/w from 7FF8h  |
        |      - last 8 bits from memory specified    |
        |        memory addresses for read and write  |
        | (2) 7FF9h is a control register:            |
        |     000bbb00                                |
        |        ||+---> enable reading 7FF0h~7FF7h   |
        |        |+----> enable reading 7FF9h         |
        |        +-----> enable read/write 7FF8h      |
        +---------------------------------------------+

Having the VW-KT300's slot 3.3 using a Panasonic Mapper seems to be a good guess. Now we just need to check if our hypothesis is correct. And it's is easy to do, we only need to take a look at the SYSTEM0 disassembled code. Search for something like this:

di
ld a,0ffh
out (0a8h),a
ld a,00fh
ld (0ffffh),a
ld a,(0edf4h)
ld (06000h),a
inc a
ld (06400h),a
ret

The snippet above is part of the "shuffling around pages" code that puzzled me. If you want to check it yourself, it's from position 0641h in the VW_SYSTEM0.ROM file. The code does the following:

  1. Disables interruptions
  2. Activates pages 0 to 3 in primary slot 3
  3. Activates pages 0 and 1 in secondary slot 3.3
  4. Activates pages 2 and 3 in secondary slot 3.0
  5. Reads an arbitrary data from 0edf4h
  6. Writes the data in address 6000h
  7. Increases data by one
  8. Writes the increased data in address 6400h
  9. Returns

It's a safe assumption that the "arbitrary data" in 0edf4h is the segment number. Then, by the addresses 6000h and 6400h, two consecutive segments were wrote on Page 0. Nice. I still find the big picture code around this one very confusing, but it's clear that it's using the Panasonic Mapper to select the data to be visible in slot 3.3

We can also see the similarities between the labels inside the FS-VA1.ROM and the full A1WSX firmware. They are even in similar offsets!

+---------+----------+----------+
| OFFSET  | FS-A1WSX | VW-KT300 |
+---------+----------+----------+
|00000010 |WSXSEG00P1|EDIT0     |
|00004010 |WSXSEG01P0|EDIT1     |
|00008010 |WSXSEG02P2|EDIT2     |
|0000c010 |WSXSEG03P0|SYSTEM1   |
|00010010 |WSXSEG04P1|VA1DATA   |
|00014010 |WSXSEG05P2|DESIGN    |
|00018010 |          |          |
|0001c010 |          |          |
|00020010 |WSXSEG06P1|          |
|00024010 |WSXSEG07P2|          |
|00028010 |WSXSEG08P1|DEMO      |
|0002c010 |WSXSEG09P0|          |
|00030010 |WSXSEG10P2|SYSTEM0   |
|00034010 |WSXSEG11P0|SAMPLE0   |
|00038010 |WSXSEG12P1|SAMPLE1   |
|...      |...       |----------+
|00170010 |WSXSEG30P1|
+---------+----------+

And what we can do with this information? Well, we still have lot of gaps in our knowledge about the Panasonic Video Titler VW-KT300, and some of them can only be filled if we can probe while the machine is running. Specially the convoluted page mapping code. Being the VW-KT300 very similar with the other Panasonic's MSX2+, and since these MSX2+ were emulated by OpenMSX, we can probably put the code from VW-KT300 to run in OpenMSX, too!

The first step is to create a machine definition in OpenMSX. A good idea is to use another MSX2+ from Panasonic as VW-KT300 base, we chose the FS-A1WSX. When a MSX turns on, it began to read the code from address 0000h in slot 0 (or 0.0), so the VW_SYSTEM0.ROM needs to be mapped there:

sha1: a321510f66f89413d18454c2cdcfd11dddd86536

We knew by the already disassembled initialization code, that the slot 3 is the only one which is expanded. So the VW_SYSTEM0.ROM is in slot 0, the other sub-slots were removed from the machine definition. Another change is the ROM size, we change to 0x4000, because VW_SYSTEM0.ROM is a 16KB ROM.

What else we know?

The slot 3.0 is the 64KB Memory Mapper, and the 3.3 is the Panasonic Mapper. The ROM file for the Panasonic Mapper needs to be a complete one. So we put the FS-VA1.ROM there:

sha1: f2def2d1f8be9c34e67e4e42675204a51aeae650

And let's start the machine!

Ok, that doesn't look right.

Black screen. Using the MSX debug, the machine was trapped in a loop in the interruption handler, it goes to 0038h, which jumps to EE15h, and there we have an FFh which calls the interruption code in 0038h. Why this is happening??

The OpenMSX console helps a lot the debugging process.

Our emulation try gives the first fruit: we find a difference between the usual MSX hardware and the PPI implemented in NEC gate-array. The SYSTEM0 didn't have the code to initialize the PPI ports. It starts just writing the slot configuration to I/O port A8h without first setting the PPI ports directions by writing in I/O port ABh.

Without writing the slot configuration in A8h, the pages 2 and 3 were kept in slot 0, which have nothing from 4000h to FFFFh. And "nothing" is a area full of FFh, that's why EE15h have FFh (rst 38h), goes back to 0038h and there returns to EE15h. We need to initialize the PPI ports configuration, then the A8h write will work as expected.

To be able to use the VW-KT300's code unmodified, I put an watchpoint at address 0001h which executes the proper PPI ports initialization when triggered. And then:

Japanese text says "Children's Day"

Japanese text says "Sport's Day"

Japanese text says "Presentation" or "Recital"

Great! It's working! I guess those screens are some kind of examples of what can be done with this Video Titler. But the splash screen is missing. Also there's a lot of empty squares were should be characters.

We still  need to debug and tune this machine definition, but that is for our next post!

Saturday, September 17, 2016

Sony Kanji Video Titler XV-J777: Inside the ROMs

In our last post we saw two video titlers from Sony:  XV-J770 and XV-J777. We find that they are both MSX based machines (if you are keeping a count, now Sony have four video titlers listed in this blog). In that previous post we show a little snippet from one of the ROMs only to confirm that those devices are MSXs. Now it's time to see all the secrets from those ROMs

The five chips at left and the one just below the Zilog are all ROMs

There are six Mask-ROM chips inside each of those video titlers, all from Fujitsu: 3 x 831000 and 3 x MB834000, totalizing 1920KB, which is a lot of data for an 8 bits computer. Besides some version numbers, I don't believe the contents of those ROMs are too different between the two titlers, Alexandre Tabajara have a XV-J777 and made a dump of all those ROMs, so we will examine them.

The first thing that I did to examine those ROMs was to split each dump file in 16KB, 32KB, 64KB, 128KB and 256KB blocks. The second step was to compare the sha1sum of each block with other better known MSX's ROMs. That strategy gives to us all the contents of one of the 831000s:
0fbd45ef3dd7bb82d4c31f1947884f411f1ca344  hb-f1xd_msx2sub.rom
12f2cc79b3d09723840bae774be48c0d721ec1c6  hb-f1xd_disk.rom
4ce41fcc1a603411ec4e99556409c442078f0ecf  hb-f1xd_basic-bios2.rom

They are the HB-F1XD's ROMs. But those files together have only 64KB and the chip is a 128KB Mask-ROM, what Sony did with the extra space? Well, Sony put a copy of the first half of the chip on the second half. The ROM have this layout:

00000-07FFF BASIC-BIOS2
08000-0BFFF MSX2-SUBROM
0C000-0FFFF DISK-ROM

10000-17FFF BASIC-BIOS2
18000-1BFFF MSX2-SUBROM
1C000-1FFFF DISK-ROM

The sha1sum strategy give to us another easy find:

6acaf2eeb57f65f7408235d5e07b7563229de799  hb-f900_kanjifont.rom

This ROM is mapped at the last 128KB of one of those MB834000, which leaves 384KB missing. And more unknown 1024KB in the other two MB834000. I believe that the majority of those ROMs are Kanji-ROMs, so we begin another sha1sum comparison, this time, splitting the Kanji Font of HB-F1XDJ in smaller blocks. That gave a better view. First, the Kanji Font of HB-F900 is included and mapped in the first half of the HB-F1XDJ's Kanji ROM. Second, all data from HB-F1XDJ's Kanji ROM are inside XV-J777 ROMs, but split in two ICs:

1st KANJI-ROM
        00000-1FFFF
        20000-3FFFF
        40000-5FFFF
        60000-7FFFF JIS1 (HB-F900/F1XDJ/F1XV)
 

2nd KANJI-ROM
        00000-1FFFF
        20000-3FFFF
        40000-5FFFF
        60000-7FFFF JIS2 (HB-F1XDJ/XV)

My guess is that one of those chips have the JIS1 and the other one the JIS2 fonts, in different resolutions.

We still have another 512KB MaskROM to examine. While it doesn't have the same sha1sums, the contents of this last ROM looks a lot like the second half of the firmware ROM from HB-F1XDJ, as you can see from this sample:

XV-J777 MSX-JE ROM
00000000  |±       ±²Ù×ÝÄÞ |
00000010  |±·º     ±¹Þ±ÌÞ× |
00000020  |±¼Þ±    ±Ã      |
00000030  |±ÍÞ¶Ü   ±×²ÊÞ   |
00000040  |±ÜÃÌÀÒ  ²¯·Æ    |
00000050  |²²¸ÙÒ   ²·µ²    |
00000060  |²º³     ²½ÞÐÀÞ  |
00000070  |²Á¼ÞÏ   ²Äº     |
00000080  |²ÎÞ¸    ²ÚÁÞ´   |
00000090  |²ÝÁ·    ³¶ÍÞ    |

HB-F1XDJ MSX-JE ROM
00080000  |±       ±²Ù×ÝÄÞ |
00080010  |±·º     ±¹Þ±ÌÞ× |
00080020  |±¼Þ±    ±Ã      |
00080030  |±ÍÞ¶Ü   ±×²ÊÞ   |
00080040  |±ÜÃÌÀÒ  ²¯·Æ    |
00080050  |²²¸ÙÒ   ²·µ²    |
00080060  |²º³     ²½ÞÐÀÞ  |
00080070  |²Á¼ÞÏ   ²Äº     |
00080080  |²ÎÞ¸    ²ÚÁÞ´   |
00080090  |²ÝÁ·    ³¶ÍÞ    |

With this last one, we can say that all MB834000 chips are related to handle the input and display of Japanese language.

Now we only have two ROM ICs to check, each one with 128KB. After search for "SONY" inside one of the ROM dumps this is what we found:
00012000  |SONY JFEP2  Ver |
00012030  |SONY Corporarion|

I remember that JFEP string... maybe from one of those latest examined ROMs? Yes! In HB-F1XDJ's MSX-JE ROM!
00000010  |SONY  JFEP  TINY|
00002000  |SONY JFEP2  Ver |

JFEP is a acronym that for "Japanese Front End Processor", and with that we have all the HB-F1XDJ MSX-JE inplemented in XV-J777. It's only a newer version:

HB-F1XDJ MSX-JE ROM
00000010  |SONY  JFEP  TINY|
00000020  | DUMMY  Version |
00000030  |1.0  May  7 1987|
00000040  |  Copyright (C) |
--
00002000  |SONY JFEP2  Ver |
00002010  |1.00  May 31 198|
00002020  |8  Copyright(C) |
00002030  |SONY Corporarion|


XV-J777 MSX-JE ROM
00012000  |SONY JFEP2  Ver |
00012010  |1.06  Mar 14 198|
00012020  |9  Copyright(C) |
00012030  |SONY Corporarion|

That explains why, although very similiar, the sha1sums of those ROMs doesn't match: XV-J777 have a newer version of F1XDJ (and F1XV) firmware. This firmware is mapped to the higher 64KB of a 831000 ROM. We still need take a look at lower 64KB.

The first 32KB looks like some kind of filesystem:

00000000  ffffffffffffffff ffffffffffffffff
          |ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
00000010  ffffffffffffffff ffffffffffffffff
          |ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
00000020  4549535531303136 2020464e54000000
          |EISU1016  FNT...|
00000030  00200000580d0000 0000000000000000
          |. ..X...........|
00000040  4549535531303234 2020464e54000000
          |EISU1024  FNT...|
00000050  00400000a01a0000 0000000000000000
          |.@.. ...........|
00000060  4549535532303136 2020464e54000000
          |EISU2016  FNT...|
00000070  00300000580d0000 0000000000000000
          |.0..X...........|
00000080  4549535532303234 2020464e54000000
          |EISU2024  FNT...|
00000090  00600000a01a0000 0000000000000000
          |.`.. ...........|

By the name of those files, say that they are fonts with 16 and 24 points is a good bet, but why have more fonts? We already have 1024KB of fonts in the Kanji-ROM ICs. Things get a bit clearer after we know that "Eisu" (英数) means "Alphanumeric", so those are the fonts for latin alphabet, and those in the Kanji-ROM are... Kanji.

In this ROM we still have a last 32KB block to see. And it's very interesting. It begins with:

00008000  c3c0400056455231 2e300000000000ff
          |ÃÀ@.VER1.0.....ÿ|

Which is very uncommon for a block header. I searched for text strings within this dump and found the following messages:

rom test
Font rom pass
Dic rom  pass
Basic    pass 1/1 sum %04x
Kanji 1  pass
%s %d/4 sum %04x
Kanji 2  pass
%s %d/4 sum %04x
%s %d/4 sum %04x
Program  pass 1/2 sum %04x
Program  pass 2/2 sum %04x

It's a health check software!! And, by this list of ROMs to be tested, now we know that the chip that have the second half of X1XDJ's firmware is the Dictionary part of MSX-JE.

This self test software helps to solve another two questions. Take a look on these strings:

XV-T550 test program ver 1.0
XV-J777 test program ver 1.1

With that, we now know why XV-T550 have a internal slot: to connect a cartridge with the self test program and help the technician to repair it.  The other question that these strings solves is: why XV-J550 and XV-T550 are so different? In our post about those two titlers I wrote:

My guess: the XV-J550 was first released in Japan. Seeing that it's a good product and there is a broader home video market, Sony wanted to sell it in Europe, but had to make some revisions on the board for this release; this new board was meant to be shared by the two versions of the titler (XV-J550 and XV-T550), but for some reason the XV-J550 with the new PCB did not reached the market (or we didn't yet found any XV-J550 with this new board). I believe that, instead release the same old product with a new internal organisation, Sony did launched new video titlers, like the XV-J770.

The test program shared by XV-T550 and XV-J777 seems to confirm my guess, while the western markets got the XV-T550 the Japanese market got XV-J770 and XV-J777.

And, with that last 32KB, the memory map of this ROM is:

00000-07FFF EISU 16/24 Fonts
08000-0FFFF Test Program
10000-1FFFF JFEP2 VER1.06 Mar 14 1989

There is now only one ROM that we don't examined yet and we already know what is there. We found the MSX BIOS, Kanji-ROM, MSX-JE and even a Test Program, but what is missing in this Video Titler? The Video Titler Software! And yes, as expected, the last 831000 is the Video Titler Software.

It's a 128KB ROM, divided in 16 blocks of 8KB, some of them are clearly labelled:

00006000  |BANK3 ÃË Ã[ Ãw¨Ã|
00008000  |BANK4 ÃF¢..å..å.|
0000a000  |BANK5 Ãf§ÃȦÃѦÃ|
0000c000  |BANK6 Ã7«Ã3«ÃM«Ã|
0000e000  |BANK7 Ã΢ÃN£Ãò¢Ã|
00010000  |BANK10Ã. 2.Ø:.Ø·|
00012000  |BANK11ÃÓ¡¬.s.K..|
00014000  |BANK12ÃA°Ãå®Ã.¿"|
00016000  |BANK13Ã7 ...*­Aë|
00018000  |BANK14Ã. 2.Ø:.Ø·|
0001a000  |BANK15Ã. +}¤<ÈÃ.|
0001c000  |BANK16ÃW¤ÃM Ãå°"|

Banks 1, 2, 8 and 9 aren't labelled. But they are there:

00000000  |AB.B............|
00002000  |Ýåá....ÍÉe¯íyíy>|
00004000  |·(+Í.}åÍy})å*ÏÃ.|
0001e000  |ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|

The first bank have the program header and the video titler software starts here. The second and third bank seems to have some program parts and the last block looks like a empty filler, the 0001db7c address is the last byte which isn't FF recorded in this ROM.

The last interesting data from those ROMs are some dates:

00000000  |AB.B............|
00000010  |VER2.07 89/3/24 |
--
0000e070  |...[.(C)1987 by |
0000e080  |Sony Corporation|

This is the version 2.07 of the Sony Video Titler software, built in 1989. There is a copyright notice from 1987, maybe from the first release?

We still have more Video Titlers from Sony to examine. But, by now, Sony's the recycling queen! Panasonic did put their old font ROMs in the VW-KT300, but Sony reuses everything: all the Video Titlers uses a very similar build, the same HB-F1XD ROMs, same Kanji-ROMs and, except the Titler Software itself, all the other stuff are small updates from other ROMs released in other MSXs.

Even the Titler Software, while not coming from their MSX computers, looks to be reused between it's Titlers (to check this we need to dump more ROMs to compare).

They really know how to reuse their know-how and previous designs.

If you want examine the ROMs, I put the dump files inside this tarball with a text describing their contents and what I know about them now. Good Luck!

Monday, June 13, 2016

Panasonic Video Titler VW-KT300 - part 2



In previous post we show the Panasonic VW-KT300 and its internals. We saw that it have a Yamaha V9958 videochip and a Z80 compatible CPU, but we still couldn't say it's a hidden MSX: there is a lot of machines that shares the same CPU and VDP of MSX1 and aren't MSXs, this could be the case here (but with MSX2+ components). So, there is a need to look the ROM contents to see if this video titler follows the MSX architecture and not only makes use of MSX's related LSIs.

The FS-VA1 ROM placement have the
"Program ROM" label on PCB

Tabajara did read the ROM identified as FS-VA1 and sent to me the output file. Running "strings" on this ROM file, we didn't found any of the MSX character strings: no "Microsoft", nor "MSX", not even a "Copyright" notice. That file wasn't an MSX BIOS, but I still did need to determine what it was and how it works. How this ROM program drives the video titler hardware.

The VW-KT300 "BIOS"


The ROM dump had 256KB, as the Z80 have a 64KB address space, usually the disassemblers processes files with 64KB maximum size. So, the first thing that I did was to split the original 256KB file in many 16KB chunks. That size choice wasn't a technical one, it was more related with my bias towards MSX architecture, so I guessed that the MSX page size would be a good size to split the file. The next steps proved that, this time,  I did a good choice :)

I ran "hexdump" on the first chunk and got this (removed spaces so it can fit on screen):

00000000 c3e0400000000000 0000000000000000 |Ãà@.............|
00000010 4544495430000000 0000000000000000 |EDIT0...........|

Hey, there is something different here. A label. I did the same in the other files and I found many labels. Some of the 16KB blocks didn't have any label, but most have. And one of them have a MSX cartridge header!

00000000 414232404d400000 0000000000000000 |AB2@M@..........|
00000010 0000000000000000 0000000000000000 |................|

After checked the labels in all 16 files, I made this map of the original ROM (the "size" is calculated with the distance to the next label):

00000000  |EDIT0...........| 16KB
00004000  |EDIT1...........| 16KB
00008000  |EDIT2...........| 32KB

00010000  |SYSTEM1.........| 16KB
00014000  |VA1DATA.........| 16KB
00018000  |AB2@M@..........| 32KB

00020000  |DESIGN..........| 32KB
00028000  |DEMO............| 32KB

00030000  |SYSTEM0.........| 16KB
00034000  |SAMPLE0.........| 16KB
00038000  |SAMPLE1.........| 32KB

A place with SYSTEM0 label seems to be a very promising place to begin the disassembler. And, indeed, it was a nice place to begin, the first bytes are:

l0000h:
        di            ;0000   f3              .
        jp l0134h     ;0001   c3 34 01        . 4 .

So, first the interrupts are disabled and the next step is a jump to address 0134h. And what is in 0134h?

l0134h:
        in a,(0f4h)   ;0134   db f4  
        and 080h      ;0136   e6 80
        jr z,l0153h   ;0138   28 19 

Hey! This is a check of bit 7 from port F4h! The MSX2+ BIOS check this bit to see if it was the boot was cold or warm. Following this code we have:

        ld a,000h     ;013a   3e 00       
        out (0ffh),a  ;013c   d3 ff  
        ld a,001h     ;013e   3e 01  
        out (0feh),a  ;0140   d3 fe  
        ld a,002h     ;0142   3e 02  
        out (0fdh),a  ;0144   d3 fd  
        ld a,003h     ;0146   3e 03  
        out (0fch),a  ;0148   d3 fc

Ports FCh, FDh, FEh and FFh are the ports to control the Memory Mapper in MSX. And if we still had doubts about the VW-KT300 architecture, the next code ends with them. It sets the slot map:

        ld a,0fch     ;014a   3e fc  
        out (0a8h),a  ;014c   d3 a8
        ld a,000h     ;014e   3e 00
        ld (0ffffh),a ;0150   32 ff
ff

There is nothing more MSX than those page-slot-subslot mapping.

The code that we read until now does: if it's a cold boot, initialize the memory mapper registers, activate page 0 on slot 0 and pages 1, 2, 3 in slot 3.0. The disassembled code follows the boot sequence and shows the PSG and VDP initialization, the filling of system variables in page 3 with the expected values, etc.

With this information, we can say the Panasonic VW-KT300 is a MSX compatible machine with a very customized BIOS. Tabajara confirmed that assumption using the Expert 1.3 ROM (MSX1 + Mapper initialization) and we can see the results on this video:


As we saw in the video, the boot runs OK and we end with the MSX-BASIC prompt on screen.

While the confirmation of this machine being MSX compatible is good news, it raises some questions about why it was built this way. We have good signs that this machine was designed and released in 1989/1990.

You can see the "MADE IN JAPAN - 1989" silk on PCB.
And in FS-VA1 ROM the year of "1990"

All the last MSX models from Panasonic (FS-A1FM, FS-A1FX, FS-A1WX, FS-A1WSX, FS-A1ST and FS-A1GT) uses versions of Toshiba T9769 MSX-Engine, which integrates the PSG, PPI, Mapper, glue logic and a high speed Z80. Why not use it in VW-KT300?

The inside machine looks like a mishmash of stuff that Matsushita had lying in their warehouse (the reused ROMs talks a story here). But, at same time, the VW-KT300 doesn't use the common platform of all last MSX models from Panasonic: it uses a Z80B from Zilog with a custom gate array instead of the T9769, and have a full rewritten BIOS! Why not follows the Sony's path and uses the MSX BIOS and the titler software over it?

Well, continuing our journey to understand this machine's BIOS, next step was to find the slot layout to boot this machine in MSX2+ mode :). First we modified the CBIOS to include a small subroutine to look each page in each slot and show the contents of the first bytes on screen. We got that chart:

        PAGE0   PAGE1   PAGE2   PAGE3
SLOT0   SYSTEM0 SAMPLE0 -
SLOT1   -       -       -
SLOT2   -       -       -
SLOT3.0 RAM     RAM     RAM     RAM
SLOT3.1 SAMPLE1 DEMO    -
SLOT3.2 -       -       -
SLOT3.3 EDIT0   EDIT0   EDIT0

Probably I did something wrong in my page switching code and the test hangs when reading data from PAGE3. Well, at least, with the chart we rebuild the EPROM with the ROMs from  A1FX, the BIOS+BASIC in place of SYSTEM0 and SAMPLE0, MSX2+ SUBROM instead of SAMPLE1 and KANJI-ROM Driver where we have DEMO in original ROM.

And... that new ROM doesn't works :(

The layout of SLOT3.3, with all pages mapped to EDIT0, is a clue that there is a custom mapper that needs to be configured somehow. No ideas here. Need to go back to disassembler to search for exotic code, like the one that begins in 0221h which sends some data to switching ports (comments and label names by me):

CMP_PORT45_DATA:
  ld hl,STRING1 ;0221 21 7e 06 Set pointer
                ;              to STRING1 (067e)
  ld c,000h     ;0224 0e 00 
RDPORT45_START:
  ld a,010h     ;0226 3e 10    10h ->
                ;              0001 0000b -> 16d
  out (043h),a  ;0228 d3 43    Switched port 43
  xor a         ;022a af       00h ->
                ;              0000 0000b -> 00d
  out (044h),a  ;022b d3 44    Switched port 44
  ld a,030h     ;022d 3e 30    30h ->
                ;              0011 0000b -> 48d
  out (045h),a  ;022f d3 45    Switched port 45

  ld b,(hl)     ;0231 46       Read how many bytes
  xor a         ;0232 af       needs to be read
                ;              from port 45
  cp b          ;0233 b8
  jr z,l0258h   ;0234 28 22    If EOF (00)

After this ports configuration, it reads N bytes from port 45, comparing it with two strings: 'MOUF1' and FFhFFh'GOT48'. I didn't found those strings in main ROM, maybe that read from port 45 reads one of the Kanji-ROMs or the dictionary?

Then the things got even weirder, this is what we have in 0258h:

l0258h:
  ld a,000h             ;0258   3e 00
  ld (0ed00h),a         ;025a   32 00 ed
  ld h,040h             ;025d   26 40
                                ;      
  ld (0ed03h),hl        ;025f   22 03 ed
  ld a,0a0h             ;0262   3e a0
  ld (0ed01h),a         ;0264   32 01 ed
CHPAGES_TOSLOT3:
  ld a,(0ed01h)         ;0267   3a 01 ed
  cp 0a0h               ;026a   fe a0
  jp c,CHPAGES01_SLOT3  ;026c   da d8 02
  inc a                 ;026f   3c     
  ld (0ed02h),a         ;0270   32 02 ed
  ld a,(0ee2fh)         ;0273   3a 2f ee
  and a                 ;0276   a7
  jr z,CHPAGES12_SLOT3  ;0277   28 08
  ld a,(0ed01h)         ;0279   3a 01 ed
  cp 0c0h               ;027c   fe c0
  jp nc,CHPAGES01_SLOT3 ;027e   d2 d8 02
CHPAGES12_SLOT3:
  call PAGE12SLOTBLOCK  ;0281   cd 69
0b

These jumps and subroutine calls shuffles the ROM's pages between the  frames and subslots of SLOT3, writing in not usual memory locations inside these subroutines. After the initial shuffle, the BIOS reads the N bytes from 4010h and compares with some strings:

CMP_BLOCK_HEADERS:
  ld hl,STRING3      ;0284 21 8d 06
  ld ix,0edf4h       ;0287 dd 21 f4 ed
RDHEADER_START:
  ld de,04010h       ;028b 11 10 40  

  ld b,(hl)          ;028e 46    Read how many  
                     ;           characters
  xor a              ;028f af      
  cp b               ;0290 b8      
  jr nz,l029dh       ;0291 20 0a If NOT EOF (00)

  ld a,(0ed01h)      ;0293 3a 01 ed  
  inc a              ;0296 3c      
  inc a              ;0297 3c      
  ld (0ed01h),a      ;0298 32 01 ed
  jr CHPAGES_TOSLOT3 ;029b 18 ca    

The character strings to be compared are SYSTEM0, SYSTEM1, VA1DATA, EDIT0, EDIT1, EDIT2, EDIT3, SAMPLE0, SAMPLE1, SAMPLE2, SAMPLE3, SAMPLE4, SAMPLE5, SAMPLE6, SAMPLE7, SAMPLE8, SAMPLE9, DEMO, DESIGN, AUTOSTART and SCENARIO. Some of those strings are the labels that we found in the ROM blocks. And others... are from the IC Card? The SRAM? From other equipment?

Just below the labels, there are a few more strings that doesn't seem to be used by or called anywhere in the code:

ASOH HIRONAKA NAKATA HAYASHI FURUKI

My guess is that these are the names of creators of this machine and BIOS.

At the end, this code to scramble and reallocate the pages left me very confused. After many attempts, I threw in the towel and stopped my efforts to understand what is happening in this code. If you want to try to continue, the tarball with all the ROMs (the full dump and split in blocks) can be downloaded from here, you can also download SYSTEM0 already disassembled and partially commented by me. Maybe it helps.

I hope someone can understand this page mapping code. It would be nice to boot this machine in MSX2+ mode and read games from the IC Card :D

Friday, June 10, 2016

Panasonic Video Titler VW-KT300 - part 1

Matsushita was one of the first companies to join the consortium MSX (some say M is Matsushita) and, as Panasonic, was the one who released the latest official model of MSX (MSX Turbo R FS-A1GT). Between the beginning and the end of the standard, Panasonic (and National) launched many different models and MSX's peripherals. Even some models with AV capabilities, such as the National FS-5500:

National FS-5500's advertising in MSX Magazine 1986-01,
it's an amazing machine with AV capabilities, one or
two floppy disk drives and a trackball integrated in
keyboard. The downside is the amount of RAM, only 64KB.

Like Sony did before, Panasonic used their know-how in MSX and Video applications to build their own videotitler: The VW-KT300. This equipment is not totally unknown by MSX users; it had a full-page article on the MSX Magazine (but without the word "MSX" in the text):

First section of the article on news from Panasonic in
MSX Magazine 1990-03. As you can see, no "MSX" in this section

And, in an other article from 1990, the VW-KT300 is already identified as based on MSX technology:

Panasonic VW-KT300 in MSX Magazine 1990-04.
The same article lists Sony XV-J770 as MSX based.

It's no surprise that this Panasonic appliance is in Wikipedia's list of MSX based hardware (The text in red says "VW-KT300 from Matsushita Electric Industrial"):

"特にビデオタイトラーでは、ソニーのXV-J550/J770/T55Fシリーズや松下電器産業のVW-KT300などの家庭用タイトラーのハードウェ ア構成は明らかにMSXを応用・流用したものである。ただし、これらの機種では基本はMSXシステムをベースとしていても独自の実装がなされており、特に BIOSなどは大幅に簡略化されMSXとしての機能は望めないなど、簡単な加工程度では汎用のMSXシステムとして使うことは不可能である。"

With that information, and some news and forums posts about XV-T550, I bought this machine, with the hope to easily boot it in MSX mode. The VW-KT300 was the first equipment that I bought in my search for hidden MSXs. It was not featured in the first post in this blog because:
  1. Other machines (Aucnet NIA-2001 and Pioneer UC-V102) have a lot more impact and
  2. The story of how I found this VW-KT300 is very boring: "I saw the name of this machine in an article in Wikipedia, I bid on an auction and won."
I bought it and, while waiting the package arrival from Japan, I began a more serious research about hidden MSX (which gave very good results). I expected to see something like the Sony XV-T550, with a full MSX BIOS, a known MSX engine and a nice cartridge slot to do some tests. When the package arrived and I put my hands on this machine, I found that I am not a good guesser.

But, even without meeting all my expectations, the machine is very interesting!

From outside it have a good design; with some inputs and outputs for video and sound, an IC card slot, a custom keyboard and a mouse.

Panasonic VW-KT300: a very clean visual in front panel,
polluted by a big colorful sticker.

Rear of VW-KT300, with many S-VIDEO and RCA connectors

The mouse is the Panasonic FS-JM1, the same that are sold for MSX computers:

The VW-KT300 mouse. The only place where you can see the MSX
logo without open the appliance.

All videotitler functions, besides the point and click, can be controlled using the small keyboard:

The control keyboard
(image from a Y!J auction. I'll change it when I (hopefully)
find where is my own keyboard)

In the front panel, we have the power button, the keyboard and mouse connectors, the IC card slot and S-video and RCA inputs. It seems that the IC cards were a common media for appliances in Japan:

As said in main text, the front panel have a power button,
power LED, keyboard and mouse connectors and IC card slot

The big sticker advertises the key features of VW-KT300.
The first line of japanese text says: "Easy and Beautiful
Kanji Titles - MACLORD Video Titler", the line below talks
about the font resolution, sample titles, characters per
screen, and transition effects. Finally we have the Input-2
connectors with S-Video and RCA

Input-1 connectors: S-VIDEO and RCA. Next the selector
for Black&White or Color output

The two sets of Output connectors. Both with S-Video and RCA

The knob to adjust the superimposer hue, then a power
outlet and the power cable connector

What is inside Panasonic VW-KT300?

When I opened the VW-KT300, I already did saw a few pictures of the mainboard on this site (in japanese) and knew that the cartridge slot was not there. But still thought that would be a MSX engine somewhere at PCB's other side and a full MSX BIOS would be waiting for me. However, as I said before, I am not a good guesser.

Half of the logic board. At top center, the NEC gate array;
at top right you can see a Z80B from Zilog.
The bottom row are the ROMs

The other half of logic board. At top left the VRAMs;
at picture's center, a CR2032 battery and an Yamaha V9958
(the chip with the heat sink). At bottom row we can see
more RAMs and the ROMs.

Talking about  the good stuff: the machine has an Yamaha V9958 with 128KB VRAM, a Z80B (faster than usual) as main processor, 64KB RAM  and many Kanji-ROMs from Panasonic's MSX equipment (computers, cartridges, printers, etc).

First we can see 64KB RAM (2 x MN41464A), then a Fujitsu
MB834200 512KB MaskROM (24-dot Kanji-Fonts), a 32KB SRAM
(Fujitsu 84256), the program ROM (FS-VA1) and another
Fujitsu 512KB MaskROM (now is a MB834000) identified in
the PCB's silk as "ROM Jisho", which means "Dictionary ROM".

After an empty IC placement there are two ROMs. The first
one is from FS-PK1 printer and the other one looks to be
the Kanji-Font of the A1FX MSX computer.

Excluding the RAMs and ROMs, the main ICs inside the VW-KT300 are:

  • Zilog Z0840006PSC: Z80 processor with 6.17Mhz clock
  • NEC D65042GD405: NEC gate array
  • Yamaha V9958: MSX2+ VDP

As we can see, no stock MSX engine in this list. But we know many MSX computers that doesn't have a engine from Yamaha or Toshiba, those machines have discrete components or a custom gate array to do the MSX engine's job,  the big NEC gate array is a good candidate to fill this role.

The NEC gate array

I took this device to Alexandre Tabajara's lab, so we can take a better look in this NEC IC and dump the program ROM. But that is a talk for our next post.

Saturday, February 13, 2016

Sony Kanji Video Titler XV-J550: the inside

A video titler is the equipment responsible to create title screens, credit lists, captions, subtitles, etc. You know, the kind of video editing that today is done by a software in any computer or even in cellphones. In the XV-J550's days this was done by specialized equipment: the video titler.

Last post we present the XV-J550 and XV-T550 video titlers. One is targeted to Japanese market and the other to western markets, this difference reflects in some changes between both models. Being a video titler, XV-J550's main function is to put text on screen, since it's aimed for Japanese market, it needs to support Kanji characters, so it have, at least, more ROM than XV-T550, to store these Kanji Fonts.

Although they have the same outward appearance, XV-J550 and XV-T550 have different PCBs. Evidence suggests that the XV-T550's PCB was prepared to be shared with the XV-J550, there are some unpopulated placements for ROM on XV-T550's mainboard that can be used by Kanji ROM.

This is the mainboard from XV-T550, take a look in the two unpopulated
placements for ROM chips and the shielding over V9938
(picture from this MSX Village thread)

By now, all (three) XV-J550 that I saw the insides had the same PCB's look (maybe different minor revisions, but the same overall shape). And this PCB's appearance is consistently different from the one that I saw in pictures of XV-T550 and is printed in its service manual:

This is the XV-J550 mainboard seen from solder side.
The two chips that you can see are the Sony custom mapper
and the MSX-System II

And this is the XV-T550 mainboard, picture from XV-T550 Service Manual.
You can see that many components are in different locations on the board.

My guess: the XV-J550 was first released in Japan. Seeing that it's a good product and there is a broader home video market, Sony wanted to sell it in Europe, but had to make some revisions on the board for this release; this new board was meant to be shared by the two versions of the titler (XV-J550 and XV-T550), but for some reason the XV-J550 with the new PCB did not reached the market (or we didn't yet found any XV-J550 with this new board). I believe that, instead release the same old product with a new internal organisation, Sony did launched new video titlers, like the XV-J770.

What's inside XV-J550?


There is two big boards (and some small boards) in XV-J550. One with all the MSX hardware and other responsible to handle the AV inputs and outputs. The designers made a very compact unit, the other video titlers from Sony have almost two times the height of the XV-J550/XV-T550:


XV-J550 on top of XV-J777.

This compactness made the XV-J550 a beautiful equipment, but compromises the "hacking" possibilities. It's impossible to use the cartridge slot  while XV-J550 is closed and is very hard to fit any additional circuitry in this limited space.

How you can use the XV-J550/XV-T550 cartridge slot

XV-J550 have most of what can be expected from a MSX2 system, but it have only one joystick port, one MSX slot and the keyboard connector doesn't have all pins connected to use a complete MSX keyboard.

CPU: Z80 @ 3.58Mhz
RAM: 64KB
VDP: Yamaha V9938 with 128KB VRAM
PPI: MSX-System II
Sound: PSG equivalent inside MSX-System II
Storage: 64KB SRAM energized by a CR2032 battery
Keyboard: separated keyboard customized for video production functions
Additional features: Superimposer
I/O ports: two stereo AV inputs and two stereo AV outputs, one keyboard connector, one joystick port and one MSX slot.

There is no external storage in XV-J550, but you can save your title sequences in the battery backed SRAM. The MSX slot lacks some pins too, namely: +12/-12 volts, SOUNDIN, SW1, SW2 and BUSDIR.

The XV-J550's mainboard. All ROMs are populated, there is
a big OKI chip connected and no shielding over the V9938.
It's in the same position of the XV-T550's mainboard that
we previously show, so you can easily compare both boards.

Without the RAM and ROM chips, the main ICs on processor board are:

Oki M71H003: Unknown
Sharp LH0080A: Z80 compatible
Sony MB64H444:Custom memory mapper
Yamaha S1985: MSX-SYSTEM II
Yamaha V9938: Video Display Processor

Here you can see the Z80, the mysterious OKI chip
and some RAMs and ROMs. You can't see the slot connector
because there is a MegaFlashROMSCC+SD 512 connected there.

The V9938 and the 128KB VRAM

MSX-System II from Yamaha

Sony custom mapper. Probably a Fujitsu MB64H444PF gate array

There is many ROM chips on this circuit board, but I still don't know what is in each one of those. This mystery will be solved when we read the contents of those ROMs in a EPROM reader. Since the Sony HB-F1XD uses the same set of S1985+MB64H444, I won't be surprised if the BIOS and SUB-ROM are also the same in the XV-J550 and HB-F1XD.

The encoder board have a more sparse look and, as said before, handles the AV inputs and outputs. There is only one IC on the backside of this circuit board.

The "other" board

The lonely IC on "other" board backside: SONY D1030

I did not found the usual SONY V70X0 chips inside the XV-J550, they are very common on MSX2 machines that have digitizer and/or superimposer features. But there are a lot of "washed" chips on the encoder board, any of those chips can be a V70X0 IC, so we can't really say that this machine hasn't the Sony video chipset.

Next post, more Sony video equipment!

Saturday, January 23, 2016

Pioneer UC-V102 - Part 4

Besides the quantity of expansion slots, Pioneer UC-V102 isn't so different than other MSX2. It's not so uncommon to japanese MSX2 machines with a more "professional" look (translation: separated keyboard) to have special features like genlock, rs232-c or both. No "turbo" mode, no memory beyond the 64KB (minimal for MSX2), etc.

The expansion slots

CPU: Z80 @ 3.58MHz
RAM: 64KB
VDP: Yamaha V9938 with 128KB VRAM
PPI: MSX-System II
Sound: PSG equivalent inside MSX-System II
Storage: Floppy Disk Interface with two 3.5in 720Kb Floppy Disk Drives
Keyboard: separated keyboard compatible with the Mitsubishi ML-G30 one
Additional features:  RS232-C, Superimposer (3 inputs)

The MSX-ROMs are four ICs, behind a metal bar (the one that holds the floppy disk drives and the expansion slots). They are identified in the silk as MM, ME, RS and DS: MSX Main, MSX Extended, RS-232C and Disk-ROM.

Panoramic view from inside the Pioneer UC-V102.
The ROMs, V9938, VRAMs, FDC are all behind the
floppy disk drives and this big metal bar that
hold them. Is a bit hard to reach them.

There you can see the Pioneer PD5044, the MSX-System II,
the RS-232C circuitry, the Z80.
All the ICs are identified by its names in the mainboard, that helps a lot. It's much easier to remove the bottom metal plate from UC-V102's cabinet than to disassemble all the machine only to free the motherboard and see the the PCB from up.

The mainboard from below.
You can see that all ICs are identified in the board prints.

This is the part with a most unobstructed view, that we can see from up.

This is the part behind metal bars and floppy disk drives.
The four ROMs that are mapped on MSX slots are at right.
Without the RAM and ROM chips, the main ICs in Pioneer UC-V102 mainboard are:

Mitsubishi M5L8251: UART compatible with i8251
Mitsubishi M5L8253: PIT compatible with i8253
Mitsubishi M5W1793: Floppy Disk Controller, compatible with WD1793
Pioneer PD5044: Custom chip, the only identification that I found was "UCV102"
Sharp LH0080A: Z80 compatible
Sony V7010: Genlock
Yamaha S1985: MSX-SYSTEM II
Yamaha V9938: Video Display Processor

The Pioneer PD5044. Next to him a switch "NORMAL" and "TEST".
In "TEST" position nothing happens when the machine is turned on.

The only IC that is unusual in MSX systems is the Pioneer PD5044 but, close to it, there is something a bit more unusual, two additional ROMs:

Toshiba TC531000: 128KB ROM
Toshiba TMM23256: 32KB ROM

Where those ROMs are mapped?? I had no idea. To be fair with myself, I just noticed them while writing this post, while I was listing the ICs. Thanks to Leonard Oliveira and mars2000you, I did the dump of the 128KB ROM using KANJIROM.BAS and... it's the same Kanji-ROM of Mitsubishi ML-G30:

29f0cee1e2fb77507b6e40d8a743d99e  UCV102KJ.ROM
29f0cee1e2fb77507b6e40d8a743d99e  mlg30kfn.rom


After this discovery, I made the same test against the other ML-G30 ROMs:

60b6a10f68bfd076d35ff58797405f76  BIOS2.ROM
60b6a10f68bfd076d35ff58797405f76  mlg30ext.rom

75c8e28609c50afb67f64c46a60cf7d2  BIOS.ROM
75c8e28609c50afb67f64c46a60cf7d2  mlg30bios.rom


Mitsubishi's keyboard, Mitsubishi's BIOS, Mitsubishi's SUBROM (this one is shared by more manufacturers, probably it comes from a common source, ASCII is a good guess), Mitsubishi's Disk-ROM, Mitsubishi's Kanji-ROM, machine built with Mitsubishi's clones of many ICs, etc. And the questions from the last post that we thought could go unanswered forever now has an answer: very probably Mitsubishi did the UC-V102 for Pioneer.

Like Sanyo built many MSX machines for Philips, looks that this time Mitsubishi built this machine for Pioneer. Even the Pioneer PD5044 could be designed by Pioneer and made in silicon in a Mitsubishi foundry.

Well, Pioneer UC-V102 is still the only MSX2 from Pioneer...







...but built by Mitsubishi.