I used an Arduino Mega 2560 to read my TRS-80 Model 1's, G with Ver 1.3 ROMS, Character generator into hex bytes.
The Arduino has PULLUP resistors enabled on the Data lines which makes the MSB (xxx11111) incorrect.
Here is an example of the data:
E0FFF1F1F1F1F1FFE0FFF0F0F0F0F0F0
E0E4E4E4E4E4E4FFE0E1E1E1E1E1E1FF
E0E8E4E2EFE4E2E1E0FFF1FBF5FBF1FF
E0E0E1E2F4F8F0E0E0EEF1F1FFEAEAFB
This requires each data byte to be ANDED with 0x1F to mask the PULLUP's incorrect data.
Since I use Linux, I knew that this was a prefect job for srec_cat. srec_cat is an invaluable tool that
can manipulate the ROM data accordingly.
For more information in Linux, use:
man srec-info
man srec_cat
The URL's of:
http://srecord.sourceforge.net/
http://srecord.sourceforge.net/man/man1/srec_examples.html
give more information on the data types, and the command specifics. There are also lots of examples.
I started by letting srec_cat & srec_info try to detect the file's data type. I knew the data was HEX bytes.
srec_info 6670tst.rom -nh -ignore_checksums
finds the correct data:
Format: Needham
Data: 0000 - 03FF
The first four lines of data from the MCM6670.txt:
E0FFF1F1F1F1F1FFE0FFF0F0F0F0F0F0
E0E4E4E4E4E4E4FFE0E1E1E1E1E1E1FF
E0E8E4E2EFE4E2E1E0FFF1FBF5FBF1FF
E0E0E1E2F4F8F0E0E0EEF1F1FFEAEAFB
shows the data has pullup resistors on the three MSD bits ({5..7}) and needs to be ANDED with 0x1F.
This command will do exactly what I need:
srec_cat infile -nh −and 0x1F −o outfile -nh -ignore_checksums -data_only
Now the actual data is:
00 1F 11 11 11 11 11 1F 00 1F 10 10 10 10 10 10
00 04 04 04 04 04 04 1F 00 01 01 01 01 01 01 1F
00 08 04 02 0F 04 02 01 00 1F 11 1B 15 1B 11 1F
00 00 01 02 14 18 10 00 00 0E 11 11 1F 0A 0A 1B
The first eight bytes are Character #0 and the next eight bytes are Character #1.