Skip to content

Instantly share code, notes, and snippets.

@remy

remy/arcade8.bas Secret

Last active March 29, 2021 06:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remy/2cedcc5186c6b25bcb68f74c1181eeff to your computer and use it in GitHub Desktop.
Save remy/2cedcc5186c6b25bcb68f74c1181eeff to your computer and use it in GitHub Desktop.
Using an arcade font in nextbasic
#autoline 10
RUN AT 3
LAYER 2,1
BORDER 0: PAPER 0: INK 255
LOAD "font8.spr" BANK 15
TILE DIM 16,0,59,8
TILE BANK 15
%x=0
%y=0
PROC writeLine("Hello World")
%y=%y+2: ; blank line
PROC writeLine("Isn't my arcade font fancy!")
%y=%y+2: ; blank line
PROC writeLine("Now, go do some work :)")
PAUSE 0
DEFPROC writeLine(l$)
%x=0
%l= LEN (l$)
FOR i=1 TO %l
PROC writeChar(l$(i))
NEXT i
%y=%y+1
ENDPROC
DEFPROC writeChar(c$)
%i=( CODE c$)-32
IF %i > 63 THEN %i=%i-32: ; we don't have lowercase, so shift down
BANK 16 POKE 0,%i
TILE 1,1 AT 0,0 TO %x,%y
%x=%x+1
ENDPROC
"��ȂȂ""����ȂȂȂȂˣȂ�˜Ȃ˜���Ȃ˸ȂȂ˴ȂˬȂˤȂȂȂˣȂ˿ȂȂ�˜˜��˜ȂȂ˸˸Ȃ˴ȂˬˬȂˤȂȂˣˣȂ˜��˜�˜ȂȂˣ˴ȂˣˬˤȂˤˣȂ￿"�Ȃ�ˣ�ˣ�ˣ˸˴ȂˣˤȂȂȂ˿"˜��Ȃ"�Ȃ�ˣˤȂ"�ˣ˜�ˣˣ"˿Ȃ"˜˜˜ȂȂ��ˣ˸ȂˣˬˬˬȂˤȂȂȂȂȂȂȂ˜�Ȃ˜�Ȃ˸˴ȂˬȂˤȂȂȂȂȂȂȂ"��ˣˣˣȂ￿￿ˣ�Ȃ˜��ˣ�ˣˣˣˤˣȂȂ"��˜�Ȃ￿￿ˣ�Ȃ˜�Ȃ�ˣȂȂˣȂȂȂȂ￿￿ˣ�Ȃ˜�Ȃˣ�ˣȂ˴ˣˤˣȂȂ￿ˣ��ˣ��ˣˣˣȂȂȂˣȂˣ￿￿￿"�ȂȂȂ�ˣȂȂ˴ˣˤˣȂȂ￿￿ˣ�Ȃ˜��ˣȂˣȂ˴ˣˤˣȂȂ￿￿￿"�Ȃ˜��ˣˣȂ￿￿ˣ�Ȃ˜��ˣ�˸ˣȂ˴ˣˤˣȂȂ￿￿ˣ�Ȃ˜��ˣ�˸Ȃ˴ˣˤˣȂȂ"�ȂȂ��ȂȂ˿ˣ˜�ˣ˜�ȂȂ˴ȂˬˣȂˤˣˣ���ȂȂȂȂȂȂ˿Ȃ�ȂȂ�ȂȂȂȂȂˣˤȂˣˣ￿￿ˣȂ˜ˣ�˜�˸ˣȂˣȂȂˤȂȂ￿"��ˣ�ˣ˜�ˣȂˬˣȂˣȂ￿￿￿ˣ�Ȃ˜��ˣ�ˣȂ˴ˣˣȂȂȂ￿￿ˣ�Ȃ˜��ˣȂˣˣˣˤˣȂȂ￿￿"�Ȃ˜ˣ�ˣ�ˣˣˣˣȂȂˣ￿￿￿"�ȂȂȂ�ˣȂȂˣȂȂȂȂ￿￿￿"�ȂȂȂ�ˣȂȂˣˣȂˣ￿￿ˣ�Ȃ˜��ˣȂˣˣ˴ˣˤˣȂȂ￿ˣ"�ˣ��ˣ�Ȃ˴ˣˣȂˣȂ"��Ȃ￿ˣ�ˣ�ˣˣˣˣˣˣˤȂˣ￿ˣ￿"�˜�ˣ���ˣˣˣˣȂˣȂ￿ˣ�ˣ�ˣˣˣˣȂȂȂȂ￿ˣ"��������˸˸˴˴ȂˬˣȂˣȂ￿ˣ"�����˜�˴ȂˣˤȂˣȂ￿￿ˣ�Ȃ˜��ˣ�ˣˣˣˤˣȂȂ￿￿￿ˣ�Ȃ˜��ˣ�ˣȂȂˣˣȂˣ￿￿ˣ�Ȃ˜��ˣ�ˣ˴ˬˤȂˣˣ￿￿￿ˣ�Ȃ˜��ˣ�ˣȂ˴ˣˣȂˣȂ￿￿ˣ�Ȃ˜��ˣˣ˸ˣȂ˴ˣˤˣȂȂ￿￿￿￿Ȃ˜�Ȃ�Ȃ￿ˣ"�ˣ��ˣ�ˣˣˣˤˣȂȂ￿ˣ"�ˣ�˜��ˣˣˤˣˣ￿ˣ"�˜˜��˜˜�ˣˤȂȂ￿ˣ"����˜��ˣˣˣˤȂȂ￿ˣ￿˜����ˣ˸Ȃ￿￿￿"�Ȃ˜�Ȃˣ�ˣˣȂȂȂȂ
@em00k
Copy link

em00k commented Mar 28, 2021

There is an example included with NextBasic on the distro, DEMOS/NEXTBASIC/BASICFNT.BAS that uses the Arcade fonts.

@remy
Copy link
Author

remy commented Mar 29, 2021

@em00k I thought there were a couple actually in the demo folder. (This was just code to accompany the process of capturing the fonts as tiles - possible and likely the demo folder code is more useful than the code above).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment