Jump to content
IGNORED

Big letters


sometimes99er

Recommended Posts

Here's a variant looking a bit like some of the first Amiga track loaders. It's funny how the pixels that are not there kinda adds further high resolution to the letters. An optical illusion of sorts.

 

100 CALL CLEAR::CALL SCREEN(2)::FOR C=5 TO 12::CALL COLOR(C,9,1)::NEXT C
110 PRINT"AMIGA TRACK LOADER","amiga track loader"::FOR C=65 TO 90::CALL CHARPAT(C,C$)
120 CALL CHAR(C,SEG$(C$,3,2)&"00"&SEG$(C$,5,2)&"00"&SEG$(C$,7,2)&"00"&SEG$(C$,9,2))
130 CALL CHAR(C+32,SEG$(C$,11,2)&"00"&SEG$(C$,13,2)&"00"&SEG$(C$,15,2))
140 CALL HCHAR(8,C-62,C)::CALL HCHAR(9,C-62,C+32)::NEXT C
150 GOTO 150

 

:)

  • Like 2
Link to comment
Share on other sites

  • 5 years later...

This is such cool trick I had to play with it in Forth.

In CAMEL99 I used integers for character patterns so I had to play games with the numbers.

 

This was made simpler by 2 little code words:

  1. SPLIT which splits an integer into 2 bytes
  2. FUSE which "fuses" to bytes into an integer

 

Once it worked, I went nuts and made TYPE.BIG which takes the address and len of a string and prints it in these big characters.

 

I would never have thought of doing this like this. Very clever.

 

EDIT: Forgot to mention, by not using strings this goes much faster. The code in the spoiler runs in 1 second.

 

 

 

\ big characters in TI BASIC by sometimes99er in CAMEL99

\ CAMEL99 defines char patterns with integers

\ so we had to get creative
: STRETCH1 ( 00AA -- AAAA)  SPLIT DROP DUP FUSE ;   \ removes top pixels
: STRETCH  ( AABB -- AAAA BBBB)  SPLIT DUP FUSE SWAP DUP FUSE ;

\ Chop Charpat into 2 patterns. Upper & lower
: SPLITPAT  ( n n n n  -- n n n n  n n n n )
             >R >R >R       \ push 3 args to rstack
             STRETCH1       \ 1st arg is special
             R> STRETCH     \ pop rstack & stretch
             R> STRETCH
             R> STRETCH
             0000  ;        \ CHARDEF need 4 args.

\ got fancy here and made a word to print strings BIG
: UPPER?   ( char -- ?)  [CHAR] A [CHAR] Z 1+ WITHIN ;
: LOWER    ( c -- c )    DUP UPPER? IF  020 OR  THEN ;

: TYPE.LOW ( adr len -- ) OVER + SWAP DO   I C@ LOWER EMIT  LOOP ;

: TYPE.BIG ( addr len -- ) 2DUP TYPE CR  TYPE.LOW  ;

DECIMAL
: RUN
     GRAPHICS
     CR S" GENERATING PATTERNS" TYPE.BIG
     CR CR
     91 65 DO                   \ loop index I is a char
        I CHARPAT SPLITPAT
        I LOWER CHARDEF
        I CHARDEF
     LOOP
     CR S" ABCDEFGHIJKLMNOPQRSTUVWXYZ" TYPE.BIG CR
     CR S" A VERY COOL TRICK" TYPE.BIG CR
     BEGIN  KEY?  UNTIL  BYE ;

 

 

post-50750-0-78229200-1502415613.jpg

bigchars.mp4

Edited by TheBF
  • Like 2
Link to comment
Share on other sites

Here's another biggie going the other way.

 

100 CALL CLEAR::CALL SCREEN(5)::FOR A=5 TO 12::CALL COLOR(A,16,1)::NEXT A
110 N$="00030C0F30333C3FC0C300000000000000CCCFF0F3FCFF"::FOR A=65 TO 90
120 CALL CHARPAT(A,C$)::PRINT CHR$(A)&CHR$(A+32);::FOR C=0 TO 1:: D$=""
130 FOR R=0 TO 7:$=D$&SEG$(N$,(ASC(SEG$(C$,C+R*2+1,1))-48)*2+1,2)::NEXT R
140 CALL CHAR(A+C*32,D$)::NEXT C::NEXT A::PRINT::PRINT::N$="QUASIPARTICLES"
150 FOR A=1 TO LEN(N$)::PRINT SEG$(N$,A,1)&CHR$(ASC(SEG$(N$,A,1))+32);::NEXT A
160 FOR A=1 TO 28::CALL SPRITE(#A,46,16,1,124,8,RND*10-5)::NEXT A::GOTO 160
                           
  • Like 3
Link to comment
Share on other sites

Very cool. Amazing what you can coax XB to do.

I will do this one too.

For this one I will have to load my sprite library and the multi-tasker.

I don't use interrupts for auto-motion in this system.

But I think I can do it...

 

B

  • Like 2
Link to comment
Share on other sites

Nice. I am having more trouble that I thought I would have, re-creating the motion characteristics of XB.

Ah the programmers life.

I guess considering that I am standing on top of a cross-compiler/assembler that I wrote, on top of the Forth kernel that it generated on top of the multitasker, on top of the sprite library I should realize it's a house of cards. :-)

 

I have 2 rules about software:

 

1. Anything is possible. YEAH!

2. Nothing is easy (oh yeah).

 

:-D

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...