Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:38 29 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Need a c64 font for MMBasic- Picomite

Author Message
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 554
Posted: 09:06am 18 Mar 2023
Copy link to clipboard 
Print this post

Hi, i try to translate some old c64 basic games to the Picomite. Have anyone converted the c64 font to MMBasic?

Gtx
Plasma
 
IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 09:23am 18 Mar 2023
Copy link to clipboard 
Print this post

I thought I read somewhere that the fonts created on the font tool at rinky dink work.

You could try there.

http://www.rinkydinkelectronics.com/t_make_font_file.php

Ian
I'd give my left arm to be ambidextrous
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1115
Posted: 12:14pm 18 Mar 2023
Copy link to clipboard 
Print this post

  Plasmamac said  Hi, i try to translate some old c64 basic games to the Picomite. Have anyone converted the c64 font to MMBasic?

Gtx

I know I have the the C64 Font in binary (somewere at my XROAR Dragon 32 Emu as I used it for "Hires Print"there).
Busy this weekend but I will look on Monday, then we just have to convert them to the Font Format
Edited 2023-03-18 22:18 by Martin H.
'no comment
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6814
Posted: 01:08pm 18 Mar 2023
Copy link to clipboard 
Print this post

I'm trying to figure out *why* anyone wants to read the C64 font. It was horrible. ;)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1115
Posted: 01:22pm 18 Mar 2023
Copy link to clipboard 
Print this post

  Mixtel90 said  I'm trying to figure out *why* anyone wants to read the C64 font. It was horrible. ;)
 
I agree with you and in my defense, I must mention that I also used a ZX Spectrum font
But maybe one want to translate 8Bit Guys PETSCII ROBOTS to the Pico.
However, the PET/CBM charset also looks better than that of the C64

This should be the Binarys for the C 64 Font:

C64 Font
Edited 2023-03-18 23:24 by Martin H.
'no comment
 
bar1010
Senior Member

Joined: 10/08/2020
Location: United States
Posts: 197
Posted: 01:55pm 18 Mar 2023
Copy link to clipboard 
Print this post

Yes, I have converted the c64 font to MMBasic.
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1115
Posted: 01:59pm 18 Mar 2023
Copy link to clipboard 
Print this post

the Bin File I linked uses 512 Chars but they seem to be not in ASCII Order
You can se it, if you print it in Binary

Cls
Open "c64.bin" For input As #1
t=0
C=0
Do
a$ = Input$(1, #1)
Print Bin$(Asc(a$),8)
c=c+1:If Not(C Mod 8) Then Print C/8:Pause 500
Loop Until Eof(#1)
Close #1

output:

00111100
01100110
01101110
01101110
01100000
01100010
00111100
00000000
1
00011000
00111100
01100110
01111110
01100110
01100110
01100110
00000000
2
01111100
01100110
01100110
01111100
01100110
01100110
01111100
00000000
3
00111100
01100110
01100000
01100000
01100000
01100110
00111100
00000000
4
01111000
01101100
01100110
01100110
01100110
01101100
01111000
00000000
5
01111110
01100000
01100000
01111000
01100000
01100000
01111110
00000000
  .. and so on
'no comment
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 292
Posted: 02:16pm 18 Mar 2023
Copy link to clipboard 
Print this post

Simple matter of writing some conversion code?
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1115
Posted: 03:54pm 18 Mar 2023
Copy link to clipboard 
Print this post

  pwillard said  Simple matter of writing some conversion code?


yes, but on the Mite chr$(0 to 31) are not Printable. So we have a Maximum of 224 Chars left. Even on the C64 it was possible to POKE the Values to Screen Memory ("Screen Code") to show them.

1. so we have to decide, which chars should stay in the Font,
2. order them in the ASCII Way.
3. open a new file and Write the "DefineFont #NR" (NR is the Number of the Font  
   followed by the "E0200808" string
      &HE0=224 = the Numner of chars,&H20 = 32= value of the first Char
      0808 is the Width and height of the Font (8x8)

4. write the Font Values as Hex Strings to the file
5. after that write "End DefineFont" and close the File  

so the theory
----- Edit ----

I  found the map of the petscii Charset
The Font in the Bin File seems to be in the Order of the "Screen Code"
0 to 255 first Charset (Upper Case and Graphic)
255 to . second Set (lower and Upper Case)
Chrs (128-255) and (384-511) are the inverted Version
confusng?  

to visualise the Charset ... use this:
Cls: print @(0,200);
Open "c64.bin" For input As #1
x=0:y=0
C=0
Do
 a$ = Input$(1, #1)
 Plot Asc(a$)
 c=c+1:If Not(C Mod 8) Then
 x=x+8: if x>319 then x=0:y=y+8
 end  if
 Loop Until Eof(#1)
Close #1

sub plot wert
v=1
for f=0 to 7
if wert and v then Pixel x+7-f,y+(c mod 8),rgb(white)
v=v+v
next
end sub



Edited 2023-03-19 05:19 by Martin H.
'no comment
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1115
Posted: 02:17pm 19 Mar 2023
Copy link to clipboard 
Print this post

  Plasmamac said  Hi, i try to translate some old c64 basic games to the Picomite. Have anyone converted the c64 font to MMBasic?

Gtx

finaly I have transformed it
like this?




cls:?:?:font 9
for f=32 to 224
?chr$(f);:next f
?
font 1


' C64 Style Font (Martin H.)
' Font type    : 192 Characters
' Font size    : 8x8 pixels
'
DefineFont #9
C0200808
00000000 00000000 18181800 18000018
66666600 00000000 FF666600 6666FF66
603E1800 187C063C 0C666200 46663018
3C663C00 3F666738 180C0600 00000000
30180C00 0C183030 0C183000 30180C0C
3C660000 00663CFF 18180000 0018187E
00000000 18180000 00000000 0000007E
00000000 18180000 06030000 6030180C
6E663C00 3C666676 38181800 7E181818
06663C00 7E60300C 06663C00 3C66061C
1E0E0600 06067F66 7C607E00 3C660606
60663C00 3C66667C 0C667E00 18181818
66663C00 3C66663C 66663C00 3C66063E
18000000 00180000 18000000 18180000
30180E00 0E183060 7E000000 00007E00
0C187000 70180C06 06663C00 1800180C
6E663C00 3C62606E 663C1800 6666667E
66667C00 7C66667C 60663C00 3C666060
666C7800 786C6666 60607E00 7E606078
60607E00 60606078 60663C00 3C66666E
66666600 6666667E 18183C00 3C181818
0C0C1E00 386C0C0C 786C6600 666C7870
60606000 7E606060 7F776300 6363636B
7E766600 66666E7E 66663C00 3C666666
66667C00 6060607C 66663C00 0E3C6666
66667C00 666C787C 60663C00 3C66063C
18187E00 18181818 66666600 3C666666
66666600 183C6666 63636300 63777F6B
3C666600 66663C18 66666600 1818183C
0C067E00 7E603018 30303C00 3C303030
30120C00 FC62307C 0C0C3C00 3C0C0C0C
3C180000 1818187E 30100000 10307F7F
00183000 00000000 063C0000 003E663E
7C606000 007C6666 603C0000 003C6060
3E060600 003E6666 663C0000 003C607E
3E180E00 00181818 663E0000 7C063E66
7C606000 00666666 38001800 003C1818
06000600 3C060606 6C606000 00666C78
18183800 003C1818 7F660000 00636B7F
667C0000 00666666 663C0000 003C6666
667C0000 60607C66 663E0000 06063E66
667C0000 00606060 603E0000 007C063C
187E1800 000E1818 66660000 003E6666
66660000 00183C66 6B630000 00363E7F
3C660000 00663C18 66660000 780C3E66
0C7E0000 007E3018 6070181E 001E1870
00181818 18181800 03070C3C 003C0C07
CEFE7300 00000000 361C0800 00007F63
FF000000 000000FF 7F3E1C08 003E1C7F
18181818 18181818 FF000000 000000FF
FFFF0000 00000000 00FFFF00 00000000
00000000 0000FFFF 30303030 30303030
0C0C0C0C 0C0C0C0C E0000000 181838F0
0F1C1818 00000007 F0381818 000000E0
C0C0C0C0 FFFFC0C0 3870E0C0 03070E1C
1C0E0703 C0E07038 C0C0FFFF C0C0C0C0
0303FFFF 03030303 7E7E3C00 003C7E7E
00000000 00FFFF00 7F7F7F36 00081C3E
60606060 60606060 07000000 18181C0F
3C7EE7C3 C3E77E3C 667E3C00 003C7E66
66661818 003C1818 06060606 06060606
7F3E1C08 00081C3E FF181818 181818FF
3030C0C0 3030C0C0 18181818 18181818
3E030000 00363676 1F3F7FFF 0103070F
00000000 00000000 F0F0F0F0 F0F0F0F0
00000000 FFFFFFFF 000000FF 00000000
00000000 FF000000 C0C0C0C0 C0C0C0C0
3333CCCC 3333CCCC 03030303 03030303
00000000 3333CCCC F8FCFEFF 80C0E0F0
03030303 03030303 1F181818 1818181F
00000000 0F0F0F0F 1F181818 0000001F
F8000000 181818F8 00000000 FFFF0000
1F000000 1818181F FF181818 000000FF
FF000000 181818FF F8181818 181818F8
C0C0C0C0 C0C0C0C0 E0E0E0E0 E0E0E0E0
07070707 07070707 0000FFFF 00000000
00FFFFFF 00000000 00000000 FFFFFF00
03030303 FFFF0303 00000000 F0F0F0F0
0F0F0F0F 00000000 F8181818 000000F8
F0F0F0F0 00000000 F0F0F0F0 0F0F0F0F
FF181818 181818FF 3030C0C0 3030C0C0
18181818 18181818 CCCC3333 CCCC3333
66CC9933 66CC9933 00000000 00000000
F0F0F0F0 F0F0F0F0 00000000 FFFFFFFF
000000FF 00000000 00000000 FF000000
C0C0C0C0 C0C0C0C0 3333CCCC 3333CCCC
03030303 03030303 00000000 3333CCCC
663399CC 663399CC 03030303 03030303
1F181818 1818181F 00000000 0F0F0F0F
1F181818 0000001F F8000000 181818F8
00000000 FFFF0000 1F000000 1818181F
FF181818 000000FF FF000000 181818FF
F8181818 181818F8 C0C0C0C0 C0C0C0C0
E0E0E0E0 E0E0E0E0 07070707 07070707
0000FFFF 00000000 00FFFFFF 00000000
00000000 FFFFFF00 6C060301 00607078

End DefineFont


you can thank me later  
Edited 2023-03-20 00:29 by Martin H.
'no comment
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6814
Posted: 02:38pm 19 Mar 2023
Copy link to clipboard 
Print this post

Dedication above and beyond the call of duty!  
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 554
Posted: 09:54pm 19 Mar 2023
Copy link to clipboard 
Print this post

Thx a lot
Plasma
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024