-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rm/rm380z.cpp: Use sn74s262 as the VDU-40 COS 3.4 character generator #12128
rm/rm380z.cpp: Use sn74s262 as the VDU-40 COS 3.4 character generator #12128
Conversation
ROM_START( sn74s262 ) | ||
ROM_REGION( 0xa00, "chargen", 0 ) | ||
ROM_LOAD( "sn74s262", 0x000, 0xa00, NO_DUMP ) | ||
ROM_LOAD( "sn74s262", 0x000, 0x500, BAD_DUMP CRC(6896d319) SHA1(1234558418a5c7a9823d54a93d0c7f63bd8a490a) ) // created by hand | ||
ROM_END |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that this halves the size of the ROM region. The only difference between the SN74S262 and SN75S263 is the ROM. A quick calculation suggests sn74s262_device::read
can only read up to ((0x7f × 10) + 7) = 0x4fd so there’s no potential to read off the end of a 0x500-byte ROM. But do you know why it might have been made 0xa00 bytes when the file was written?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well it contains more than 128 characters. After index 127 most of them are blank, but some characters are present all the way up to 255. For example:
This is somewhat strange, but maybe the teletext characters were obtained from the ROM file at one time. The SN74S262 specs definitely say that it only contains 128 45-bit characters so allowing 10 bytes per character should equate to 0x500 bytes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean the SN75S263 file contains more than 128 characters...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In summary I think the size was just taken from the SN75S263 file size which is most likely wrong! I think it should really have been shrunk to get rid of the ghost characters in the second half of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In summary I think the size was just taken from the SN75S263 file size which is most likely wrong! I think it should really have been shrunk to get rid of the ghost characters in the second half of the file.
But if that’s the case, doesn’t the SN75S263 need to have a different mask for the character? With the code as it is now, the second half of the SN75S263 is completely inaccessible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SN75S263 is only used by the Luxor ABC 80 (in MAME) and that had two character modes (text and graphics). Looking at the ROM more closely it looks like the second half matches these graphics characters so maybe at one time both text and graphics characters were drawn using data in this ROM file? Remember that it was also created by hand so perhaps whoever did that based it on the complete ABC 80 character set, not just those characters provided by the SN75S263?
Page 112 of this English manual shows the complete character set and broadly matches what I see in the ROM file except that the ROM file substitutes some for Swedish characters:
https://www.abc80.net/archive/luxor/ABC80x/ABC800-manual-BASIC-II.pdf
In src/mame/luxor/abc80_v.cpp (line 175) the SN75S263 device is only used to draw the text characters so it looks like the current mask is fine now.
This PR uses the sn74s262 device, to replace the old fake character ROM, for VDU-40 character generation.
As a dump of the sn74s262 ROM does not seem to exist I have re-created it by hand from the datasheet:
http://www.datasheetarchive.com/SN74S262N-datasheet.html
The complete character set now looks like this when displayed in MAME:
which matches the COS 3.4 character tables shown on pages 2.3 and 2.5 of the Firmware reference manual:
https://vt100.net/rm/docs/pn10971.pdf
This is my new sn74s262 romset:
sn74s262.zip
I've used the same format as the existing sn74s263 ROM which was also created by hand, but have only included the 1280 bytes used for the 128 characters in the sn74s262 character set. The other ROM seems to include further characters, but only the first 128 are actually accessible using the device.
The main benefit of this is that the special characters, such as arrow symbols, are now drawn properly as can be seen from the following Front Panel screenshot. It also means we don't need the silly zero -> 'O' hack anymore.
This is my assembler program to display the character set:
charset_vdu40.zip
I also wrote a Python program to display and edit the character ROM if anybody is interested. It's just something I hacked together for this task, but I might make it more generic eventually.