Page 2 of 4 < 1 2 3 4 >
Topic Options
#63868 - 08/16/10 02:16 AM Re: Sanyo MBC 550 or 555 emulator [Re: John Elliott]
Duke Offline
Senior Member

Registered: 05/12/04
Posts: 626
Loc: Germany
Can someone scan the technical manual? It doesn't seem too complicated to write a basic driver for it.

Top
#63869 - 08/16/10 05:52 AM Re: Sanyo MBC 550 or 555 emulator [Re: Duke]
Stiletto Offline
Senior Member

Registered: 10/29/06
Posts: 599
Oh phew, I thought I was going to have to go hunt down more chip docs with this. That looks like pretty standard stuff that has a lot of documentation available for it, it's just hooked up a little oddly.

Top
#63870 - 08/16/10 08:36 AM Re: Sanyo MBC 550 or 555 emulator [Re: Stiletto]
judge Offline
Very Senior Member

Registered: 04/13/04
Posts: 1438
Did regular pc keyboards work on this machine? If not, then we may need a dump of the controller in the keyboard as well.

Top
#63881 - 08/16/10 06:55 PM Re: Sanyo MBC 550 or 555 emulator [Re: judge]
John Elliott Offline
Member

Registered: 09/12/04
Posts: 26
No, the keyboard's an RS232 device, as I recall. You could probably get away with feeding ASCII to the input channel of the USART.

I can't lay my hand on the tech ref at the moment, unfortunately -- I daresay if I keep looking it'll turn up somewhere.

Top
#63882 - 08/16/10 09:21 PM Re: Sanyo MBC 550 or 555 emulator [Re: Stiletto]
BradN Offline
Member

Registered: 08/14/10
Posts: 6
Honestly Sanyo's technical manual isn't all that useful. It has some good info but some is misleading as well, and it's more useful as a reference for their ram-BIOS and keyboard than the hardware itself.

I've got a copy of the SAMS computerfacts for this machine with schematics and troubleshooting info. I've also got all of the important datasheets.

I'll scan the schematics later, just not sure of a good place to upload them to. Beware, Sanyo has done some strange things with this smile

If anyone needs the scancodes, I can collect them - "normal" keys are all the same as ascii, ctrl is indicated as parity error, there are bizarre key combinations to get function keys that don't exist on the keyboard, and there is also the graph lock which sends high ascii graphics characters. Break and ctrl+c are identical if I recall, but ctrl+break can be distinguished separately (I use this as a break-out function in my BIOS). I can also extract the key mapping table from ROM - this may be enough to do what you want by constructing a reverse table.

Note that if the 8251 keyboard serial controller is switched from 64x into 16x or 1x divisor mode, then each bit of the keyboard signal will change into 4 or 64 identical bits respectively. Only the 64x asynchronous or 1x synchronous modes have useful properties (proper 1 key buffering with buzzy sound, or 78.6KHz 1 bit sound output with software reconstructed key data respectively) , so emulating the 16x mode probably isn't needed.

It's a fun machine to program, and I'm looking forward to having a little time to figure out my low pass filter scheme, as well as finishing up other parts of the BIOS I'm working on.

I've got a working version that boots a load-address modified FreeDOS with basic keyboard/onboard-video/disk support, with optional aes-256 disk encryption, but you probably need 512KB RAM to do much useful. 256 may let you run some normal programs without command.com loaded.

Tested software:
edchess (need CGA)
twin spreadsheet (need CGA, graphics doesn't work yet)
tm text editor (needs an NEC V20 processor)
abc programming environment.
Intel 8087 diagnostics (all tests passed but freezes after)
Insight debugger (need CGA, some keyboard problems)

Some issues:

V20 CPU: Formatting or copying disks with sanyo's software doesn't work with a V20, but I wrote simple formatters hardcoded to drive/capacity that work with the V20. Sanyo's CGA routines don't block snow with a V20 (cosmetic only).

FreeDOS doesn't play nice with alternate capacities (eg, 400KB) unless all the disks you insert are that capacity - I think I may need to simulate disk change notification (or implement it correctly by watching index sensors) to make that work better. Seems to be a bug in FreeDOS's 5-second rule for machines with no changeline support.

My keyboard BIOS doesn't yet handle key flags (shift, ctrl, alt, etc) - so programs like Insight debugger don't read all keys properly.

Does anyone have some web space I could host dsBIOS and datasheets on, or know of an easy free one to set up?

Top
#63883 - 08/16/10 09:51 PM Re: Sanyo MBC 550 or 555 emulator [Re: BradN]
BradN Offline
Member

Registered: 08/14/10
Posts: 6
Oh, also, I'm looking for more precise info on the 6845 CRTC chip - I was having trouble finding the exact period of a video frame by calculating it out from the mode parameters (I'd like to do this to achieve timer based vsync/vert pos), but trial and error is a pain when you already know that a frame isn't an exact multiple of the 78.6KHz timer0 clock. It may be an exact multiple of the timer2 channel, but that can't generate an interrupt and it's used for the add-in serial card's clock.

In any event, having this chip and the timer emulated perfectly timing wise would be necessary for advanced video trickery, for example 640x400x(1+.5+.5)bpp interlaced should be possible by pageflipping the green plane (red and blue planes only have one page so they would be shared between fields or unused entirely).

Having the CPU's timing emulated perfectly would be icing on the cake if it ever comes to the point of per-scanline effects, but I'm not sure the CPU is fast enough for that anyway, with the way the CRTC has indexed registers.

Top
#63894 - 08/17/10 05:40 PM Re: Sanyo MBC 550 or 555 emulator [Re: BradN]
Stiletto Offline
Senior Member

Registered: 10/29/06
Posts: 599
Originally Posted By: BradN
Honestly Sanyo's technical manual isn't all that useful. It has some good info but some is misleading as well, and it's more useful as a reference for their ram-BIOS and keyboard than the hardware itself.

I've got a copy of the SAMS computerfacts for this machine with schematics and troubleshooting info. I've also got all of the important datasheets.

I'll scan the schematics later, just not sure of a good place to upload them to. Beware, Sanyo has done some strange things with this smile

If anyone needs the scancodes, I can collect them - "normal" keys are all the same as ascii, ctrl is indicated as parity error, there are bizarre key combinations to get function keys that don't exist on the keyboard, and there is also the graph lock which sends high ascii graphics characters. Break and ctrl+c are identical if I recall, but ctrl+break can be distinguished separately (I use this as a break-out function in my BIOS). I can also extract the key mapping table from ROM - this may be enough to do what you want by constructing a reverse table.

Note that if the 8251 keyboard serial controller is switched from 64x into 16x or 1x divisor mode, then each bit of the keyboard signal will change into 4 or 64 identical bits respectively. Only the 64x asynchronous or 1x synchronous modes have useful properties (proper 1 key buffering with buzzy sound, or 78.6KHz 1 bit sound output with software reconstructed key data respectively) , so emulating the 16x mode probably isn't needed.

It's a fun machine to program, and I'm looking forward to having a little time to figure out my low pass filter scheme, as well as finishing up other parts of the BIOS I'm working on.

I've got a working version that boots a load-address modified FreeDOS with basic keyboard/onboard-video/disk support, with optional aes-256 disk encryption, but you probably need 512KB RAM to do much useful. 256 may let you run some normal programs without command.com loaded.

Tested software:
edchess (need CGA)
twin spreadsheet (need CGA, graphics doesn't work yet)
tm text editor (needs an NEC V20 processor)
abc programming environment.
Intel 8087 diagnostics (all tests passed but freezes after)
Insight debugger (need CGA, some keyboard problems)

Some issues:

V20 CPU: Formatting or copying disks with sanyo's software doesn't work with a V20, but I wrote simple formatters hardcoded to drive/capacity that work with the V20. Sanyo's CGA routines don't block snow with a V20 (cosmetic only).

FreeDOS doesn't play nice with alternate capacities (eg, 400KB) unless all the disks you insert are that capacity - I think I may need to simulate disk change notification (or implement it correctly by watching index sensors) to make that work better. Seems to be a bug in FreeDOS's 5-second rule for machines with no changeline support.

My keyboard BIOS doesn't yet handle key flags (shift, ctrl, alt, etc) - so programs like Insight debugger don't read all keys properly.

Does anyone have some web space I could host dsBIOS and datasheets on, or know of an easy free one to set up?


We can stash the datasheets on http://mess.redump.net if they aren't commonly available. If it's something you can commonly find on datasheetarchive.com in just as good a quality, there's no real point. For now at least. (I'd like to do something similar to MAMEItalia's Citylan but it will take a while)

The BIOS can't be hosted there, however. But I'm sure people are interested in seeing that, plus eventually you scanning the schematics and other documentation that you have. If worse comes to worse, put it on Megaupload or something.

Top
#63895 - 08/17/10 05:52 PM Re: Sanyo MBC 550 or 555 emulator [Re: BradN]
Stiletto Offline
Senior Member

Registered: 10/29/06
Posts: 599
Originally Posted By: BradN
Oh, also, I'm looking for more precise info on the 6845 CRTC chip - I was having trouble finding the exact period of a video frame by calculating it out from the mode parameters (I'd like to do this to achieve timer based vsync/vert pos), but trial and error is a pain when you already know that a frame isn't an exact multiple of the 78.6KHz timer0 clock. It may be an exact multiple of the timer2 channel, but that can't generate an interrupt and it's used for the add-in serial card's clock.

In any event, having this chip and the timer emulated perfectly timing wise would be necessary for advanced video trickery, for example 640x400x(1+.5+.5)bpp interlaced should be possible by pageflipping the green plane (red and blue planes only have one page so they would be shared between fields or unused entirely).

Having the CPU's timing emulated perfectly would be icing on the cake if it ever comes to the point of per-scanline effects, but I'm not sure the CPU is fast enough for that anyway, with the way the CRTC has indexed registers.


I _think_ we can do this now. Not sure though, since I'm no expert.

MAME/MESS's 6845 CRTC implementations have been rewritten like three times, what's another time?

You have MESS's http://git.redump.net/cgit.cgi/mess/tree/src/mess/video/crtc6845.c
and
http://git.redump.net/cgit.cgi/mess/tree/src/mess/video/m6845.c
and MAME's
http://git.redump.net/cgit.cgi/mess/tree/src/emu/video/mc6845.c

and IIRC we have more documentation than you can shake a stick at.

Still a mess... (heh)

Top
#63896 - 08/17/10 06:21 PM Re: Sanyo MBC 550 or 555 emulator [Re: Stiletto]
Duke Offline
Senior Member

Registered: 05/12/04
Posts: 626
Loc: Germany
Gah, stop reminding me of those extra implementations, they need to die as soon as possible. Afaik the MAME one is better in every aspect.

Top
#63897 - 08/17/10 06:34 PM Re: Sanyo MBC 550 or 555 emulator [Re: Duke]
Stiletto Offline
Senior Member

Registered: 10/29/06
Posts: 599
Agreed, extra implementations on ANYTHING in MAME/MESS need to die the whole way across the board. Sadly, it's a bit beyond my current abilities to help with that. frown

That, and the amount of regression testing could be ridiculous. frown

Top
Page 2 of 4 < 1 2 3 4 >


Who's Online
9 registered (Kaylee, Firehawke, ASH, etabeta78, Belegdol, mfm005, R. Belmont, Just Desserts, Heretical_One), 18 Guests and 1 Spider online.
Key: Admin, Global Mod, Mod
Shout Box

Forum Stats
4345 Members
9 Forums
7228 Topics
87127 Posts

Max Online: 183 @ 03/06/12 06:21 PM