Author Topic: Rom to Font (using PSET)... Works Great 8x16 font  (Read 3708 times)

0 Members and 1 Guest are viewing this topic.

Offline PMACKAY

  • Forum Regular
  • Posts: 188
  • LIFE is Temporary
    • View Profile
Rom to Font (using PSET)... Works Great 8x16 font
« on: September 15, 2018, 05:07:18 am »
Just a Rom Set 8x16

very small but complete
* mbfontromworking.zip (Filesize: 2.81 KB, Downloads: 243)
MackyWhite

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: Rom to Font (using PSET)... Works Great 8x16 font
« Reply #1 on: September 15, 2018, 06:06:41 am »
Nice! This is your graphic editor ouput saved as binary file?

Offline PMACKAY

  • Forum Regular
  • Posts: 188
  • LIFE is Temporary
    • View Profile
Re: Rom to Font (using PSET)... Works Great 8x16 font
« Reply #2 on: September 15, 2018, 09:08:12 pm »
you can load all types of fonts with my routine. (go to mess roms and you can load up the char roms).. you can load the files up and use them in an editor and re save them in bin if you want to have custom sets. i was going to make an edit for games. but i don't think pset is fast enough for games. then again it looks to be pretty fast how it is.

JSOUT: REM SIMPLE STRING ROUTINE
FOR I = 1 TO LEN(A$)
    B = ASC(MID$((A$), I, 1))
    JOUT X + I, Y, font$(B), COL%
NEXT I

RETURN
REM 8BIT BIN CONVERSION
FUNCTION BIN$ (n%)
    max% = 8 * LEN(n%): MSB% = 1: FOR i% = max% - 1 TO 0 STEP -1
        IF (n% AND 2 ^ i%) THEN MSB% = 1: b$ = b$ + "Û" ELSE IF MSB% THEN b$ = b$ + " "
    NEXT i%: IF b$ = "" THEN BIN$ = "0" ELSE BIN$ = b$
    BIN$ = RIGHT$(BIN$, 8)
    '    FOR FLI = 8 TO 1 STEP -1: FLI$ = FLI$ + MID$(BIN$, FLI, 1): NEXT FLI: BIN$ = FLI$
END FUNCTION
SUB JOUT (X%, Y%, CHAR$, COL%)
    Y1% = 0: X1% = 0: FOR I% = 1 TO 8 * 16: IF MID$((CHAR$), I%, 1) <> " " THEN PSET (X1% + X% * 8 - 8, Y1% + (Y% * 16 - 16)), COL%
        X1% = X1% + 1: IF X1% > 8 THEN X1% = 1: Y1% = Y1% + 1
    NEXT I%
END SUB


You can easitly make this 8x8 and load c64 char roms. it is set for 8x16. just change the loops to 8x8 instead of 8x16. reverse the data and take the first tow binary lines from .c64 files are it works good, you will have to relocate the chars to match the pc ASCII files. the is quiet easy. micro-bee ROM fonts read right to left, not standard left to right. anyway i think my loops should be easy to modify.
MackyWhite