|
Forum Index : Microcontroller and PC projects : CMM2: Fun with sinclair font.
| Author | Message | ||||
| capsikin Guru Joined: 30/06/2020 Location: AustraliaPosts: 342 |
There is a Sinclair font available and it seemed like a good idea to try using it to make a Spectrum-style display. I did notice a couple of font alignment issues - the flashing K in its box, and the n next to the dollar sign. But I reckon it's still a beautiful sight to behold 800x600 seems to leave a good sized border using doubled pixels. This makes sense, as the original PAL TV signal is around 625 lines interlaced, depending how much overscan you count. fakezx.zip edited to add: I modified the font to fix the alignment fakezx-aligned.zip #include "zxfont.inc" mode 1,8 'mode 2,8 scale=2 'mode 3,8 'scale=1 round_corners=48 'round_corners=16 zx.hres=256 zx.vres=192 zx.vres_main=192-2*8 '2 lines at the bottom are reserved for input xoffset=(MM.HRes-zx.hres*scale)/2 yoffset=(MM.VRes-zx.vres*scale)/2 'border=RGB(white) border=RGB(cyan) paper=RGB(white) ink=RGB(black) sub zx.font font 8,scale end sub sub zx.colours colour ink,paper end sub sub zx.inv_colours colour paper,ink end sub sub zx.border_colours colour ink,border end sub sub zx.border_inv_colours colour border,ink end sub sub zx.cls_and_border cls bezel rbox 0,0,MM.Hres,MM.VRes,round_corners,border,border box xoffset,yoffset,zx.hres*scale),zx.vres_main*scale),,paper,paper end sub sub zx.at x,y print @(xoffset+x*8*scale,yoffset+y*8*scale) ; end sub sub zx.print_at x,y,str$ text xoffset+x*8*scale,yoffset+y*8*scale), str$,,,scale end sub zx.cls_and_border zx.colours zx.font zx.print_at 0,0, " 5 BORDER 5" zx.print_at 0,1, " 10 PRINT "+chr$(34)+"Hello!"+chr$(34) zx.print_at 0,2, " 20> GO TO 10" zx.at 0,3 : print " 30 INPUT "+chr$(34)+"What is your name?"+chr$(34)+";" zx.at 0,4 : print "n$" zx.print_at 0,5, " 40 GO TO 30" zx.border_colours zx.print_at 0,23, " 20K GO TO 10" prompt$="K" do zx.print_at 4,23,prompt$ pause 320 zx.border_inv_colours zx.print_at 4,23,prompt$ pause 320 zx.border_colours loop until inkey$ <> "" Edited 2020-09-13 16:12 by capsikin |
||||
| capsikin Guru Joined: 30/06/2020 Location: AustraliaPosts: 342 |
I've mostly[1] converted the teletext font by 3d@galax.xyz and I've adapted the program to make a BBC micro screen. Teletext fonts: teletext-cmm2.zip BBC micro screen program: bbc.zip [1] I didn't convert the double sized block graphics characters. Edited 2020-09-13 23:36 by capsikin |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |