Skip to content

Ismael-VC/learning-uxn-uf-by-making-a-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning UXN Tal and UF Forth by making a game.

This repository contains ported code from the video tutorial "Learning Forth by Programming a Game - Bill Ragsdale" in UXN Tal (.tal) and UF Forth (.fth).

UXN

Installation

$ git clone https://git.sr.ht/\~rabbits/uxn
$ cd uxn
$ mkdir ~/bin
$ sudo apt install libsdl2-dev wget  # Ubuntu
$ pkg install sdl2 wget              # Android Termux
$ ./build.sh --install               # copies executables to ~/bin
$ cp boot.rom ~/roms
$ export PATH=~/bin:$PATH
$ cd ~/.config/micro
$ mkdir syntax && cd syntax
$ # Setup UXN Tal syntax highlighting for the micro editor.
$ wget https://hacklab.nilfm.cc/dotfiles/raw/main/micro/syntax/uxn.yaml

Updating

$ cd uxn
$ git pull
$ ./build.sh --install
$ cp boot.rom ~/roms

Configuration

# ~/.zshrc
alias asm="~/bin/uxnasm"            # assembler
alias cli="~/bin/uxncli"            # command line interface
alias emu="~/bin/uxnemu"            # graphical emulator
alias uxn="uxnemu ~/roms/boot.rom"  # Varvara's Potato OS

export PATH=~/bin:$PATH

Workflow

$ micro file-name.tal
$ uxnasm file-name.tal fil-name.rom && uxncli file-name.rom
$ uxncli rom-name.rom &> file-name.txt

UF

Installation

$ git clone https://gitlab.com/b2495/uf
$ cd uf
$ uxnasm kernel.tal kernel.rom
$ uxncli kernel.rom <uf.f
$ cp ufx.rom uf.rom uf0.rom ~/roms
$ sudo apt install rlwrap                 # CLI REPL readline editing support

Updating

$ cd uf
$ git pull
$ uxnasm kernel.tal kernel.rom
$ uxncli kernel.rom <uf.f
$ cp ufx.rom uf.rom uf0.rom ~/roms

Configuration

# ~/.zshrc
alias ufx="uxnemu -2x ~/roms/ufx.rom"     # core + uxn + graphical
alias uf="rlwrap uxncli ~/roms/uf.rom"    # core + uxn
alias ufo="rlwrap uxncli ~/roms/uf0.rom"  # core

Updating configuration

$ micro ~/zshrc    # do edits
$ source ~/.zshrc  # reload configs

Workflow

$ micro file-name.fth  # edit code
$ uf < file-name.fth   # give uf a file to read as code (exits when finished though!)
$ uf                   # repl + copy paste code

About

"Learning Forth by Programming a Game - Bill Ragsdale" in UF and UXN Tal.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published