From: Ben Harris Date: Mon, 24 Jun 2024 12:38:32 +0000 (+0100) Subject: Add "rom.ps" for generating MAME-style font ROM images X-Git-Tag: bedstead-002.007~30 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=20e3456c3ecc05cc12b6b0acef45cd7a675e6b5e;p=bedstead.git Add "rom.ps" for generating MAME-style font ROM images This could be used to provide images for MAME to use, but it's also useful for comparing against images from other sources to spot errors. --- diff --git a/rom.ps b/rom.ps new file mode 100644 index 0000000..c2db58e --- /dev/null +++ b/rom.ps @@ -0,0 +1,54 @@ +%! +% +% This file can be used to produce a ROM image suitable for use with +% MAME's emulation of the SAA5050 family. To produce such an image, +% use a command like this: +% +% gs -P -q -dSAFER -sDEVICE=bit -o saa5051.rom rom.ps +% +% The image can also be compared against images from other sources to +% detect errors in one or other source. Currently only the SAA5051 +% image is supported. +% +% This command may be useful for turning ROM images back into source +% code: +% +% hexdump \ +% -e '" /* %3_ad */ {{" 1/1 "/*%03o,*/" 1/1 "%03o" 8/1 ",%03o" "}, -1},\n"' +% +/SAA5050 +[ 32 { /.notdef } repeat + /space/exclam/quotedbl/sterling/dollar/percent/ampersand/quotesingle + /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash + /zero/one/two/three/four/five/six/seven + /eight/nine/colon/semicolon/less/equal/greater/question + /at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O + /P/Q/R/S/T/U/V/W + /X/Y/Z/arrowleft/onehalf/arrowright/arrowup/numbersign + /endash/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o + /p/q/r/s/t/u/v/w + /x/y/z/onequarter/dblverticalbar/threequarters/divide/filledbox + 128 { /.notdef } repeat +] /Encoding defineresource +/SAA5051 +[ 32 { /.notdef } repeat + /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright + /parenleft/parenright/asterisk/plus + /comma.saa5051/hyphen/period.saa5051/slash + /zero/one/two/three/four/five/six/seven + /eight/nine/colon.saa5051/semicolon.saa5051/less/equal/greater/question + /section/A/B/C/D.saa5051/E/F/G/H/I/J.saa5051/K/L.saa5051/M/N/O + /P/Q/R/S/T/U/V/W + /X/Y/Z/Adieresis/Odieresis/Udieresis/asciicircum/underscore + /degree/a/b/c/d/e/f/g/h/i/j.saa5051/k/l/m/n/o + /p/q/r/s/t/u/v/w/x/y/z/adieresis/odieresis/udieresis/germandbls/filledbox + 128 { /.notdef } repeat +] /Encoding defineresource +<< /HWResolution [ 72 72 ] + /PageSize [ 8 960 ] >> setpagedevice +/Bedstead findfont 10 scalefont setfont +2 952 moveto +/SAA5051 findencoding +32 96 getinterval +{ glyphshow -6 -10 rmoveto } forall +showpage