<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://f256wiki.wildbitscomputing.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Eacontrerasd</id>
	<title>Foenix F256 / Wildbits/K2 Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://f256wiki.wildbitscomputing.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Eacontrerasd"/>
	<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Special:Contributions/Eacontrerasd"/>
	<updated>2026-04-18T14:08:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Software_for_6502&amp;diff=38369</id>
		<title>Software for 6502</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Software_for_6502&amp;diff=38369"/>
		<updated>2026-01-05T18:05:32Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: /* Utilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note that when an hex address is given, it&#039;s meant to instruct as to which address to bload or to send (ie foenixmgr python script) the program (ie a .bin file) to before running it. For extra help on how to run .bin files and almost every possible scheme that has to be used to run program, you can consult this video that&#039;s also part of [[Getting Started]], this one: https://www.youtube.com/watch?v=0ShFv89KGDs&lt;br /&gt;
&lt;br /&gt;
Many download links are posts in the main [https://discord.gg/9vjUEGgcUS Foenix Retro Systems discord server] which will require you to join in order to get to them.&lt;br /&gt;
&lt;br /&gt;
A [[Getting Started#Demos Archive|Demo Archive]] was put together in September 2023 to get ready to show to youtubers, some of these are linked once more, in this page.   &lt;br /&gt;
&lt;br /&gt;
There&#039;s also the Foenix Marketplace website maintained by EMWhite with its own collection of articles and software http://apps.emwhite.org/foenixmarketplace/.  &lt;br /&gt;
&lt;br /&gt;
===== Curated SD card collection of games, demos, utilities =====&lt;br /&gt;
Here is a download link to a zip file meant to be extracted into the root of an SD card: https://github.com/Mu0n/F256MiscGoodies/tree/main/SDCard_Collection&lt;br /&gt;
&lt;br /&gt;
Best to wipe out your SD card and start anew with the contents of this extracted to root. Micah&#039;s file manager doesn&#039;t like long lists of files so it really is best to not overdo it. I tried to minimize the files in root, but I couldn&#039;t for everything.&lt;br /&gt;
&lt;br /&gt;
Open the readme.txt file with moreorless to see some instructions about the collection. Best to run /- fm first, then open the readme.txt from it&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|F256 f/term&lt;br /&gt;
|Terminal emulator for F256K and Jr with classic (flat) memory load&lt;br /&gt;
|Micah&lt;br /&gt;
| - fterm.pgZ or use f/manager&lt;br /&gt;
|https://github.com/WartyMN/F256-terminal/blob/main/release/fterm.pgZ&lt;br /&gt;
|-&lt;br /&gt;
|FoenixTarot&lt;br /&gt;
|Tarot card readings in SuperBasic&lt;br /&gt;
|Mike&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/mcassera/FoenixTarot/tree/main&lt;br /&gt;
|-&lt;br /&gt;
|Forthf256&lt;br /&gt;
|Forth implementation&lt;br /&gt;
|Vasyl&lt;br /&gt;
|pgz in its forth/ folder&lt;br /&gt;
|https://github.com/VasylTsv/ForthX16&lt;br /&gt;
|-&lt;br /&gt;
|WildBits Graphic Toolkit&lt;br /&gt;
|(fmr. F256-GraphicToolkit) Sprite editor, Tilemap editor, Font editor + misc tools&lt;br /&gt;
|econtrerasd&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/econtrerasd/F256-GraphicToolkit/releases&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Demos ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|badapple&lt;br /&gt;
|A 80x60 textmode port of Bad Apple, uses the VS1053b for quality mp3 audio. Needs a Jr2 or K2!&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz*&lt;br /&gt;
|*unzip badapple.zip into the root of your SD card. If done right, the 3 files within will be in the demos/ folder. The program expects its data file there when it runs. https://github.com/Mu0n/F256MiscGoodies/blob/main/apps/badapple.zip&lt;br /&gt;
|-&lt;br /&gt;
|balls&lt;br /&gt;
|Draw a good quantity of multiplexed sprites, fast. Balls bouncing around&lt;br /&gt;
|celton&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/FoenixRetro/demos/blob/main/MultiplexedSprites.md&lt;br /&gt;
|-&lt;br /&gt;
|F256Archon&lt;br /&gt;
|Splash screen intro, plays MIDI using the SAM2695, requires a K2 or Jr2&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/Mu0n/F256Archon/releases&lt;br /&gt;
|-&lt;br /&gt;
|f256_life&lt;br /&gt;
|An implementation of Conway&#039;s game of life&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/rmsk2/f256_life&lt;br /&gt;
|-&lt;br /&gt;
|F256 Mandelbrot&lt;br /&gt;
|Draws Mandelbrot set fast (5 mins) using coprocessor math. Allows to zoom into the set.&lt;br /&gt;
|mgr42&lt;br /&gt;
|uses basic loader&lt;br /&gt;
|https://github.com/rmsk2/F256_Mandelbrot&lt;br /&gt;
|-&lt;br /&gt;
|F256ShowCase&lt;br /&gt;
|Shows sliding tiling graphics, moves with joystick&lt;br /&gt;
|eriktier&lt;br /&gt;
|$0000&lt;br /&gt;
|https://github.com/pig-games/F256Showcase&lt;br /&gt;
|-&lt;br /&gt;
|fnxmas23 &lt;br /&gt;
|PSG mod music, scrolling text, sound effects, must see demo!&lt;br /&gt;
|dwsJason and digarok&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/Mu0n/F256MiscGoodies/raw/refs/heads/main/apps/xmas24_k2.pgz revised version that can run on wave 2 Jr2 and K2 as well&lt;br /&gt;
|-&lt;br /&gt;
|foenixmas23&lt;br /&gt;
|Xmas 2023 demo with SID music from the classic 1983 C64 xmas demo&lt;br /&gt;
|EMWhite&lt;br /&gt;
|uses basic loader&lt;br /&gt;
|http://apps.emwhite.org/shared-files/815/?foenixmas23.zip&lt;br /&gt;
|-&lt;br /&gt;
|livingworlds&lt;br /&gt;
|Living Worlds, a port of a color cycling by Mark Ferrari, ported here on the F256 by haydenkale&lt;br /&gt;
|haydenkale&lt;br /&gt;
|$0000&lt;br /&gt;
|https://github.com/clandrew/livingworlds/tree/e4532e0d530b76ccb90368fdf5ad10bfa2deeb12&lt;br /&gt;
|-&lt;br /&gt;
|mandel&lt;br /&gt;
|Will draw a mandelbrot set in 3 hours, more useful as a stability test than a useful fractal program&lt;br /&gt;
|Mu0n&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/Mu0n/F256KbasicBASICdoodles?tab=readme-ov-file#fractal&lt;br /&gt;
|-&lt;br /&gt;
|mariobros&lt;br /&gt;
|Tilemap and platformer test based on Mario Bros. (1983)&lt;br /&gt;
|beethead&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/noyen1973/mariobros&lt;br /&gt;
|-&lt;br /&gt;
|wormhole&lt;br /&gt;
|Shows a fast wireframe animation of a wormhole&lt;br /&gt;
|haydenkale&lt;br /&gt;
|pgz or bin at $0000&lt;br /&gt;
|https://github.com/clandrew/wormhole?tab=readme-ov-file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Games ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|bbombers&lt;br /&gt;
|Boulder Bombers (Alpha-2)  Clone of Canyon Bombers&lt;br /&gt;
|Scott (xDraconian)&lt;br /&gt;
|pgx&lt;br /&gt;
atari joystick&lt;br /&gt;
|https://github.com/scttgs0/BoulderBombers&amp;lt;nowiki/&amp;gt;https://github.com/scttgs0/BoulderBombers/releases/tag/alpha_2&lt;br /&gt;
|-&lt;br /&gt;
|Bombsweeper&lt;br /&gt;
|Bomb sweeper port&lt;br /&gt;
|beethead&lt;br /&gt;
|pgz&lt;br /&gt;
|https://discord.com/channels/691915291721990194/855689509520932885/1196352934083035156&lt;br /&gt;
|-&lt;br /&gt;
|Cosmic&lt;br /&gt;
|Shoot &#039;em up&lt;br /&gt;
|beethead&lt;br /&gt;
|pgz&lt;br /&gt;
|https://discordapp.com/channels/691915291721990194/1054250238308790342/1175982979537969214&lt;br /&gt;
|-&lt;br /&gt;
|F256-Trek&lt;br /&gt;
|Updated Trek, with modern F256 Graphics&lt;br /&gt;
|econtrerasd&lt;br /&gt;
|basic&lt;br /&gt;
|[https://github.com/econtrerasd/Trek-F256/releases/tag/v1.0 https://github.com/econtrerasd/Trek-F256/releases]&lt;br /&gt;
|-&lt;br /&gt;
|F256 two to the power of eleven&lt;br /&gt;
|Port of the puzzle game of 2048&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/rmsk2/F256_2048&amp;lt;nowiki/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|fillerup&lt;br /&gt;
|Fill &#039;er Up (WIP)&lt;br /&gt;
Qix-like game&lt;br /&gt;
|Scott (xDraconian)&lt;br /&gt;
|pgx&lt;br /&gt;
atari joystick&lt;br /&gt;
|https://github.com/scttgs0/Fill-er-up&lt;br /&gt;
|-&lt;br /&gt;
|FusionDrive&lt;br /&gt;
|An outrun type game that also plays a MIDI soundtrack&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|wip v0.2, can use a NES pad #1 to move around, or left/right arrow keys currently https://github.com/Mu0n/F256KsimpleCdoodles/tree/main/NoFussDemos&lt;br /&gt;
|-&lt;br /&gt;
|jewelkeeper&lt;br /&gt;
|Sokoban port&lt;br /&gt;
|beethead&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/Mu0n/F256MiscGoodies/raw/refs/heads/main/apps/jewelkeeper.pgz&amp;lt;nowiki/&amp;gt;You can now specify a level file when loading the game &amp;lt;code&amp;gt;/- jewelkeeper.pgz &amp;lt;levels.txt&amp;gt;&amp;lt;/code&amp;gt;.  Find more levels at https://www.sourcecode.se/sokoban/levels.php.  Keep in mind the maximum level dimension is 20x15, anything larger will be ignored&lt;br /&gt;
|-&lt;br /&gt;
|Jr Wördl&lt;br /&gt;
|port of Wordle&lt;br /&gt;
|AgeAgeEye&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/ageageeye/Superbasic-F256Jr-examples&lt;br /&gt;
|-&lt;br /&gt;
|kartdemo&lt;br /&gt;
|Kart racing game&lt;br /&gt;
|SprySloth&lt;br /&gt;
|pgz&lt;br /&gt;
|https://discord.com/channels/691915291721990194/1225217654487253094/1228246780840513556&lt;br /&gt;
|-&lt;br /&gt;
|Lair of the Lich King&lt;br /&gt;
|Rogue like dungeon crawler. Demo has 3 levels; full has 25+&lt;br /&gt;
|Micah&lt;br /&gt;
| - lkdemo/lk.pgz&lt;br /&gt;
|[https://discord.com/channels/691915291721990194/1230670413361844244/1317256215566487593 1.0 Beta 19 Demo]&lt;br /&gt;
|-&lt;br /&gt;
|livewire&lt;br /&gt;
|Livewire (WIP)&lt;br /&gt;
Tempest-like game&lt;br /&gt;
|Scott (xDraconian)&lt;br /&gt;
|pgx&lt;br /&gt;
atari joystick&lt;br /&gt;
|https://github.com/scttgs0/Livewire&lt;br /&gt;
|-&lt;br /&gt;
|Maze-Munch&lt;br /&gt;
|Pac-Man clone&lt;br /&gt;
|SprySloth&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/cmassat/Maze-Munch&lt;br /&gt;
|-&lt;br /&gt;
|pdefense&lt;br /&gt;
|Planetary Defense (WIP)&lt;br /&gt;
|Scott (xDraconian)&lt;br /&gt;
|pgx&lt;br /&gt;
mouse&lt;br /&gt;
atari joystick&lt;br /&gt;
|https://github.com/scttgs0/PlanetaryDefense&lt;br /&gt;
|-&lt;br /&gt;
|Shanghai/Mahjongg&lt;br /&gt;
|A clone of Shanghai. Also known as Mahjongg&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz or KUP&lt;br /&gt;
mouse needed&lt;br /&gt;
|https://github.com/rmsk2/f256_mahjong&lt;br /&gt;
|-&lt;br /&gt;
|Ski-Jr&lt;br /&gt;
|Ski game downhill&lt;br /&gt;
|digarok&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/digarok/superbasic-traveler/blob/main/ski-jr.bas&lt;br /&gt;
|-&lt;br /&gt;
|Track &amp;amp; Field&lt;br /&gt;
|Olympic Game by Konami (WIP)&lt;br /&gt;
|Scott (xDraconian)&lt;br /&gt;
|pgz&lt;br /&gt;
atari joystick or keyboard&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Tetris&lt;br /&gt;
|Good old 80&#039;s game&lt;br /&gt;
|Daniel Tremblay (Grenouye)&lt;br /&gt;
|pgz&lt;br /&gt;
atari joystick or keyboard&lt;br /&gt;
|https://github.com/dtremblay/c256-tetris/tree/f256k&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Game Jam #01 - April 6th/7th 2024 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|15puzzle&lt;br /&gt;
|Number sort puzzle&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/rmsk2/f256_15puzzle/releases&amp;lt;nowiki/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Flight Simulator&lt;br /&gt;
|flying simulator&lt;br /&gt;
|sduensin&lt;br /&gt;
|pgz&lt;br /&gt;
|https://cdn.discordapp.com/attachments/1225481966200029286/1227764847819620454/shotel.pgz&lt;br /&gt;
|-&lt;br /&gt;
|frisbee&lt;br /&gt;
|Frisbee throw past sport game&lt;br /&gt;
|dwsJason&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/dwsJason/f256/blob/develop/merlin32/frisbee/frisbee.pgz&lt;br /&gt;
|-&lt;br /&gt;
|Impasse&lt;br /&gt;
|Shoot &#039;em up&lt;br /&gt;
|digarok&lt;br /&gt;
|pgz&lt;br /&gt;
|https://discord.com/channels/691915291721990194/1225481966200029286/1227075699895046235&lt;br /&gt;
|-&lt;br /&gt;
|soccur&lt;br /&gt;
|mutliplayer game of soccer&lt;br /&gt;
|beethead&lt;br /&gt;
|pgz&lt;br /&gt;
|executable:https://discord.com/channels/691915291721990194/1225481966200029286/1226808228948611184&lt;br /&gt;
source code:&lt;br /&gt;
https://discord.com/channels/691915291721990194/1225481966200029286/1226812472069980232&lt;br /&gt;
|-&lt;br /&gt;
|Trek&lt;br /&gt;
|port of classic Star Trek game&lt;br /&gt;
|contrerasd&lt;br /&gt;
|basic&lt;br /&gt;
|https://discord.com/channels/691915291721990194/1225481966200029286/1226727849944289341&lt;br /&gt;
|-&lt;br /&gt;
|Typing Star&lt;br /&gt;
|typing reaction game&lt;br /&gt;
|haydenkale&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/clandrew/typestar&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Game Jam #02 - October 25th-November 1st 2024 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|Bach&#039;s MIDI Hero&lt;br /&gt;
|Free MIDI/PSG play + note play tutorial&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
the MIDI feature requires a F256K2 or F256Jr2; a legacy PSG option also allows F256K and F256Jr to still hear it. Optionally uses a MIDI in controller plugged in.&lt;br /&gt;
|https://github.com/Mu0n/F256KsimpleCdoodles/releases/download/v1.2/BachHero.pgz&lt;br /&gt;
|-&lt;br /&gt;
|f256_snake&lt;br /&gt;
|&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz. Use cursor keys, Atari joystick or SNES pad to play&lt;br /&gt;
|https://github.com/rmsk2/f256_snake&lt;br /&gt;
|-&lt;br /&gt;
|fnxsnake&lt;br /&gt;
|&lt;br /&gt;
|silk-neon&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/ksiondag/fnxsnake&lt;br /&gt;
|-&lt;br /&gt;
|The Hallow&lt;br /&gt;
|&lt;br /&gt;
|beethead&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/noyen1973/FoenixGameJamOct2024&lt;br /&gt;
|-&lt;br /&gt;
|Halloween Birthday&lt;br /&gt;
|&lt;br /&gt;
|SprySloth&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/cmassat/GameJam2024_F256K&lt;br /&gt;
|-&lt;br /&gt;
|Haunted Mansion&lt;br /&gt;
|&lt;br /&gt;
|digarok&lt;br /&gt;
|superbasic&lt;br /&gt;
|https://github.com/digarok/fnxgamejam-haunted-mansion&lt;br /&gt;
|-&lt;br /&gt;
|Kooyan&lt;br /&gt;
|&lt;br /&gt;
|Grenouye&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/dtremblay/kooyan.git&lt;br /&gt;
|-&lt;br /&gt;
|Spooky Run&lt;br /&gt;
|&lt;br /&gt;
|dwsJason&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/dwsJason/spooky&lt;br /&gt;
|-&lt;br /&gt;
|Trick or Treat&lt;br /&gt;
|&lt;br /&gt;
|Mike&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/mcassera/TrickOrTreat&lt;br /&gt;
|-&lt;br /&gt;
|Ultima III - Exodus&lt;br /&gt;
|port&lt;br /&gt;
|Minstrel Dragon&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/minstreldragon/F256_Ultima_3&lt;br /&gt;
|-&lt;br /&gt;
|Warlock&lt;br /&gt;
|remake of 68000 game&lt;br /&gt;
|xDraconian&lt;br /&gt;
|pgz&lt;br /&gt;
atari joystick&lt;br /&gt;
DOWN=change_level&lt;br /&gt;
UP=jump&lt;br /&gt;
UP-LEFT=leap&lt;br /&gt;
UP-RIGHT=leap&lt;br /&gt;
|https://github.com/scttgs0/Foenix_GameJam_Oct2024&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Game Jam #03 - April 18th-April 27th 2025 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|Arcade Shanghai v1.2&lt;br /&gt;
|Shanghai clone&lt;br /&gt;
|contrerasd&lt;br /&gt;
|basic, keep the .bas program in root, the rest in the provided ashanghai/ folder&lt;br /&gt;
|https://github.com/econtrerasd/ashanghai/releases&lt;br /&gt;
|-&lt;br /&gt;
|Bawk Bawk Cluck Cluck&lt;br /&gt;
|Chicken themed platformer&lt;br /&gt;
|beethead&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/noyen1973/FoenixGameJamApr2025&lt;br /&gt;
|-&lt;br /&gt;
|BitLadder&lt;br /&gt;
|Shoot &#039;Em Up&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz. For full sound compatibility, a Jr2 or K2 is needed. &lt;br /&gt;
Uses 4 sound chips! (PSG, SID, OPL3, MIDI)&lt;br /&gt;
|https://mu0n.itch.io/bitladder&lt;br /&gt;
|-&lt;br /&gt;
|F256_Commando&lt;br /&gt;
|Commando port&lt;br /&gt;
|SprySloth&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/cmassat/F256_Commando&lt;br /&gt;
|-&lt;br /&gt;
|F256_LodeRunner&lt;br /&gt;
|Lode Runner port&lt;br /&gt;
|Minstrel Dragon&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/minstreldragon/F256_Loderunner/releases&lt;br /&gt;
|-&lt;br /&gt;
|Mahjong&lt;br /&gt;
|Shangai clone&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/rmsk2/f256_mahjong/releases&lt;br /&gt;
|-&lt;br /&gt;
|Quarth&lt;br /&gt;
|Block placement arcade game&lt;br /&gt;
|Grenouye&lt;br /&gt;
|pgz&lt;br /&gt;
|https://grenouye.itch.io/f256-quarth&lt;br /&gt;
|-&lt;br /&gt;
|Skee(ster)-Ball&lt;br /&gt;
|&lt;br /&gt;
|Mike&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/mcassera/skeeball256/tree/main&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Game Jam #04 - November-December 2025 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|Fallitaire&lt;br /&gt;
|A cozy fall-themed twist on Pyramid Solitaire, built for the Foenix F256K2 Game Jam!&lt;br /&gt;
|Programmer Vs World&lt;br /&gt;
|bas&lt;br /&gt;
|https://programmervsworld.itch.io/fallitaire&lt;br /&gt;
|-&lt;br /&gt;
|H.E.R.O.&lt;br /&gt;
|Port of the classic game H.E.R.O.&lt;br /&gt;
|Cibee&lt;br /&gt;
|pgz&lt;br /&gt;
|https://c1bee.itch.io/hero&lt;br /&gt;
|-&lt;br /&gt;
|Leaderboard&lt;br /&gt;
|Golf game&lt;br /&gt;
|xDraconian&lt;br /&gt;
|pgz&lt;br /&gt;
|https://discord.com/channels/691915291721990194/1424187774642290799/1456104940186501132&lt;br /&gt;
|-&lt;br /&gt;
|Pitfall&lt;br /&gt;
|Port of the classic Pitfall game from Activision&lt;br /&gt;
|MinstrelDragon&lt;br /&gt;
|pgz&lt;br /&gt;
|https://minstrel.itch.io/pitfall-foenix-f256x&lt;br /&gt;
|-&lt;br /&gt;
|Return of the Falcon&lt;br /&gt;
|&lt;br /&gt;
|Callisto&lt;br /&gt;
|TBD&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Swicheroo&lt;br /&gt;
|An Alternate Puzzle Game&lt;br /&gt;
|jbaker8935&lt;br /&gt;
|pgz&lt;br /&gt;
|https://jbaker8935.itch.io/switcheroo&lt;br /&gt;
|-&lt;br /&gt;
|Track Day&lt;br /&gt;
|v1.0 top down race game vs computer controlled opponents&lt;br /&gt;
|MikeC&lt;br /&gt;
|pgz&lt;br /&gt;
|https://mcassera.itch.io/track-day-racing&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Music ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|cozyMIDI&lt;br /&gt;
|Plays a SMF with the SAM2695 or VS1053b &lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|cozyMIDI v2.4 can open and play type 0 and type 1 standard MIDI files (SMF)&lt;br /&gt;
needs a Jr2 or K2&lt;br /&gt;
with a 2x core at https://github.com/Mu0n/F256KsimpleCdoodles/tree/main/NoFussDemos&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
run operation 1: just as itself, it will force you to pick a midi file in the &#039;midi/&#039; folder /- cozymidi&lt;br /&gt;
&lt;br /&gt;
run operation 2: in f/manager, if you put this as &amp;lt;code&amp;gt;midiplayer.pgz&amp;lt;/code&amp;gt;in the &#039;_apps/&#039; folder, f/manager will open midi file with it when you launch .mid files. &lt;br /&gt;
&lt;br /&gt;
Program link: https://github.com/Mu0n/F256KsimpleCdoodles/raw/refs/heads/main/NoFussDemos/cozymidi.pgz&lt;br /&gt;
|-&lt;br /&gt;
|digestMidi&lt;br /&gt;
|converts .mid to .dim&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|.mid files are slow to load, parse and prepare for a playback. This tool comes in to convert them into a .dim format that strips out unnecessary MIDI commands and sets it up for timer0 time delays. Works with type 0 and type 1 standard midi files. This tools does the conversion and lets you hear the result.&lt;br /&gt;
Find the latest version here: https://github.com/Mu0n/F256MiscGoodies/tree/main/apps&lt;br /&gt;
|-&lt;br /&gt;
|EdInHisLib&lt;br /&gt;
|SID+OPL3 simultaneously&lt;br /&gt;
|beethead, ported from xantax&lt;br /&gt;
|pgz&lt;br /&gt;
|F256 port: https://discordapp.com/channels/691915291721990194/1054249926521016392/1184413356598231120&lt;br /&gt;
original: &amp;lt;nowiki&amp;gt;https://csdb.dk/release/?id=170898&amp;lt;/nowiki&amp;gt;. Not 100% accurate but close.&lt;br /&gt;
|-&lt;br /&gt;
|F256amp&lt;br /&gt;
|mp3, ogg, wav, wma file playback&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|(aka audioplayer.pgz) v2.3 Needs a Jr.2 or K2 since it uses the VS1053b chip.&lt;br /&gt;
For a starter collection of .mp3 and other audio files, check the SD curated collection here: https://github.com/Mu0n/F256MiscGoodies/tree/main/SDCard_Collection&lt;br /&gt;
run operation 1: just as itself, it will force you to pick an audio file. it expects a &amp;lt;code&amp;gt;media/mp3/&amp;lt;/code&amp;gt; folder, but it can live without it and peek into the root instead. &lt;br /&gt;
&lt;br /&gt;
run operation 2: with an argument, it will auto-play it: /- f256amp yourmp3file.mp3 &lt;br /&gt;
&lt;br /&gt;
run operation 3:  in f/manager, if you put this as &amp;lt;code&amp;gt;audioplayer.pgz&amp;lt;/code&amp;gt; in the &#039;_apps/&#039; folder. This lets f/manager automatically open up .mp3, .wav, .ogg, .wma that you press enter on.&lt;br /&gt;
&lt;br /&gt;
Program link: https://github.com/Mu0n/F256KsimpleCdoodles/raw/refs/heads/main/NoFussDemos/f256amp.pgz&lt;br /&gt;
|-&lt;br /&gt;
|FireJam&lt;br /&gt;
|all chips, music playing with MIDI in&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|v1.2 MIDI in and out capable, it will still partially work with a Jr. (PSG, and SID if you have them), a K (PSG, SID, OPL3) and the newest wave 2 Jr2 and K2 (PSG, SID, OPL3, SAM, VS1053b).&lt;br /&gt;
Best to use with a MIDI in controller, but it&#039;ll be controllable with arrows and space to make notes individually, or the F keys to start beats. https://github.com/Mu0n/F256KsimpleCdoodles/tree/main/NoFussDemos&lt;br /&gt;
|-&lt;br /&gt;
|jrtracker&lt;br /&gt;
|Tracker based in basic and uses the PSG&lt;br /&gt;
(considered obsolete, use tracker2)&lt;br /&gt;
|contrerasd&lt;br /&gt;
|basic&lt;br /&gt;
|https://ptb.discord.com/channels/691915291721990194/1008139105386889346/1188292876984143983&lt;br /&gt;
|-&lt;br /&gt;
|modo&lt;br /&gt;
|MOD player using the PSG&lt;br /&gt;
|dwsJason and digarok&lt;br /&gt;
|pgz&lt;br /&gt;
|https://discordapp.com/channels/691915291721990194/855689509520932885/1190723114661859429&lt;br /&gt;
|-&lt;br /&gt;
|Musik&lt;br /&gt;
|Music piece demo using MIDI&lt;br /&gt;
|Mike&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/mcassera/Musik/blob/main/Musik.PGZ&amp;lt;nowiki/&amp;gt;Musikalisches Würfelspiel&lt;br /&gt;
Requires a Jr2 or K2 since it uses MIDI&lt;br /&gt;
|-&lt;br /&gt;
|opl3snooper&lt;br /&gt;
|playback of VGM files (that use opl2 and opl3) and MIDI in&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|v1.0  mainly plays back vgm files, but you can pause it and snoop around the channel instruments and play up to 18 note polyphony with MIDI in. expects a collection in media/vgm/, or it will browse from the root if it can&#039;t find.  &lt;br /&gt;
It can load a .spl (Simple PLaylist) text file, which is one file per line, including their respective paths. &lt;br /&gt;
Requires a Jr2 or K2 with a 2x core to use the extra bank of SRAM.&lt;br /&gt;
For a starter collection of .vgm files, check the SD curated collection here: https://github.com/Mu0n/F256MiscGoodies/tree/main/SDCard_Collection&lt;br /&gt;
run operation 1: just as itself, it will force you to pick a midi file in the &#039;media/vgm/&#039; folder &lt;br /&gt;
&lt;br /&gt;
run operation 2: in f/manager (v1.1b9 and up), if you put this as &amp;lt;code&amp;gt;vgmplayer.pgz&amp;lt;/code&amp;gt;in the &#039;_apps/&#039; folder, f/manager will open midi file with it when you launch .vgm files. &lt;br /&gt;
&lt;br /&gt;
Program link: https://github.com/Mu0n/F256KsimpleCdoodles/raw/refs/heads/main/NoFussDemos/opl3snooper.pgz &lt;br /&gt;
|-&lt;br /&gt;
|opl3tweak&lt;br /&gt;
|uses MIDI in, plays 18 channels polyphony in real time to the YMF262 OPL3. Fish for random register values.&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|v0.1. Can&#039;t save or load instrument definitions yet. Needs a K2 with a MIDI in currently.  https://github.com/Mu0n/F256KsimpleCdoodles/raw/refs/heads/main/NoFussDemos/opl3tweak.pgz&lt;br /&gt;
Arrows to move around, + and - keys to incr/decr values or type in a hex value directly under the highlighted position.&lt;br /&gt;
|-&lt;br /&gt;
|piano&lt;br /&gt;
|Plays some PSG notes with the keyboard&lt;br /&gt;
|Mu0n&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/Mu0n/F256KbasicBASICdoodles?tab=readme-ov-file#pulse-sound-generator-piano&lt;br /&gt;
|-&lt;br /&gt;
|playvgm&lt;br /&gt;
|plays a headless vgm file with OPL3&lt;br /&gt;
|G33kyAndIKnowIt&lt;br /&gt;
|pgx&lt;br /&gt;
|https://github.com/natebarney/playvgm-f256k&lt;br /&gt;
some example music files can be gotten from this post:&lt;br /&gt;
[https://discord.com/channels/691915291721990194/975117322836656138/1220366429640065074 https://discord.com/channels/6][https://discord.com/channels/691915291721990194/975117322836656138/1220366429640065074 91915291721990194/975117322836656138/1220366429640065074]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) open a normal .vgm into a hex editor &amp;lt;nowiki/&amp;gt;and cut out the header bytes from 0x00 to 0x&amp;lt;nowiki/&amp;gt;FF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) run by first using superbasic&#039;s &#039;&#039;&#039;&#039;&#039;bload&#039;&#039;&#039;&#039;&#039; &#039;&#039;&#039;&#039;&#039;&amp;quot;yourmusicfile&amp;quot;, $01000&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
followed by running this program with &#039;&#039;&#039;&#039;&#039;/- playvgm.pgx&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|sidtweak&lt;br /&gt;
|uses MIDI in, plays 6 channels polyphony in real time to the dual SID. Fish for random register values.&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|v0.1. Can&#039;t save or load instrument definitions yet. Needs a K2 with a MIDI in currently. https://github.com/Mu0n/F256KsimpleCdoodles/raw/refs/heads/main/NoFussDemos/sidtweak.pgz&lt;br /&gt;
Arrows to move around, + and - keys to incr/decr values or type in a hex value directly under the highlighted position.&lt;br /&gt;
|-&lt;br /&gt;
|rawsidplayer&lt;br /&gt;
|plays raw PSID files from the HVSC collection, converted by zigreSID&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|(formely psidplayer) v0.2 find rawsidplayer.pgz and a starter .rsd file (raw sid dumps). For a starter collection of .rsd files, check the SD curated collection here: https://github.com/Mu0n/F256MiscGoodies/tree/main/SDCard_Collection &lt;br /&gt;
extract sid.zip into a folder /sid/ in the root of your SD card, that&#039;s where psidplayer.pgz will first look to let you pick a file. failing that, it will fall back to the root folder and let you navigate.&lt;br /&gt;
&lt;br /&gt;
program link:&lt;br /&gt;
&lt;br /&gt;
https://github.com/Mu0n/F256KsimpleCdoodles/raw/refs/heads/main/NoFussDemos/rawsidplayer.pgz&lt;br /&gt;
|-&lt;br /&gt;
|tracker2 v1.5&lt;br /&gt;
|Like jrtracker.bas, but using both PSGs&lt;br /&gt;
|contrerasd&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/econtrerasd/Tracker2/releases&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Uti&amp;lt;nowiki/&amp;gt;lities ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Descrip&amp;lt;nowiki/&amp;gt;tion&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|basic2text&lt;br /&gt;
|A simple utility for translating Commodore BASIC (all variants) from its native tokenized file format to a text format that can be opened with SuperBASIC. Does not perform any code translation: all adaptation is up to you. &lt;br /&gt;
|Micah&lt;br /&gt;
|pgZ&lt;br /&gt;
|https://github.com/WartyMN/F256-BasText/releases/latest&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|dcopy&lt;br /&gt;
|A tool to copy files from one drive to another or to/from your PC via RS-232 and a nullmodem cable&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz/flash&lt;br /&gt;
|https://github.com/rmsk2/f256_dcopy&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|f/manager&lt;br /&gt;
|A general file utility, launcher, and memory viewing program. Dual-panel file/memory browsers; copy between disks,  between folders on same disk, and from memory to disk and vice versa; delete, rename, and duplicate files; view files as hex or text (with word-wrap); launch applications and known file types; set the RTC clock; search in RAM and flash. Works with internal SD card and IEC devices such as FNX1591 and Commodore 1541. Can be installed in primary flash position ahead of SuperBASIC or DOS, or at a higher location. Can also be run from disk with &amp;quot;- fm.pgz&amp;quot;.&lt;br /&gt;
|Micah&lt;br /&gt;
|pgZ/flash&lt;br /&gt;
|https://github.com/WartyMN/F256-FileManager/releases&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|f256_reset&lt;br /&gt;
|A small utility that lets you reset the machine through this piece of flash software&lt;br /&gt;
|mgr42&lt;br /&gt;
|flash&lt;br /&gt;
|https://github.com/rmsk2/f256_reset&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|fcart&lt;br /&gt;
|A program that allows to write data to flash expansion cartridges &lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz, on-board and cartridge flash&lt;br /&gt;
|https://github.com/rmsk2/cartflash&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|flashcart&lt;br /&gt;
|Allows to wipe a block of flash or write a program to a flash cart, from this basic program from the F256Jr/K&lt;br /&gt;
|redfool.&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/Red-Fool/F256_FlashCart/tree/main&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|flashselect&lt;br /&gt;
|Allows to select a program to start from a flash cartridge via a menu&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz, on-board and cartridge flash&lt;br /&gt;
|https://github.com/rmsk2/flashselect&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|fonts&lt;br /&gt;
|A variety of fonts using the standard F256 character set arrangement. Load with the F256 file manager (f/manager), or your own code.&lt;br /&gt;
|Micah&lt;br /&gt;
|(not a program)&lt;br /&gt;
|[https://github.com/WartyMN/Foenix-Fonts/tree/main https://github.com/WartyMN/Foenix-Fonts]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|midiStuff&lt;br /&gt;
|Test program for a F256K2 or F256Jr2 that sends MIDI data to the internal sam2695 dream chip that produces MIDI based audio. Also test a keyboard controller plugged in the MIDI in port.&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/Mu0n/F256KsimpleCdoodles/blob/main/README.md#midistuff&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|moreorless&lt;br /&gt;
|A text editor for the Foenix 256 line of computers&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/rmsk2/moreorless/releases/&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|pgz2flash&lt;br /&gt;
|A program for your Linux, Windows or MacOS machine to turn any PGZ or SuperBASIC program into a KUP which can be run from cartridge or onboard flash memory&lt;br /&gt;
|mgr42&lt;br /&gt;
|Executable for modern computers&lt;br /&gt;
|https://github.com/rmsk2/pgz2flash&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sidTester&lt;br /&gt;
|Simple superbasic program that tests out all 3 voices of the SID1 on the Jr (if populated), K, Jr2 and K2. Ported by Mu0n, made by andy on HackJunk.com https://hackjunk.com/2017/11/07/commodore-64-sid-tester/&lt;br /&gt;
|andy&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/Mu0n/F256MiscGoodies/blob/main/apps/sidtester.bas&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|testsuite.bas&lt;br /&gt;
|a series of tests for your F256, video modes and sound chips&lt;br /&gt;
|econtrerasd&lt;br /&gt;
|basic&lt;br /&gt;
|run from the root, &lt;br /&gt;
https://github.com/econtrerasd/testSuite-F256/releases&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|wget&amp;lt;nowiki/&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki/&amp;gt;fetches a file from a http address if you have a network connection active. Works with the K and Jr. ESP32 Feather &#039;huzzah&#039; board. Not meant to be used with the K2 and Jr2 Wiznet chip.&lt;br /&gt;
|gadget&lt;br /&gt;
|&amp;lt;nowiki/&amp;gt;pgz/flash&lt;br /&gt;
|https://github.com/ghackwrench/F256_wget&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample Code ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|Assembly examples&lt;br /&gt;
|Sample programs for several features of the Foenix F256K and Jr.&lt;br /&gt;
|mgr42&lt;br /&gt;
|read github&lt;br /&gt;
|https://github.com/rmsk2/Hello_Foenix256_Jr/blob/main/testprogs.md&lt;br /&gt;
|-&lt;br /&gt;
|cc65 example&lt;br /&gt;
|c example code&lt;br /&gt;
|gadget&lt;br /&gt;
|read github&lt;br /&gt;
|https://github.com/ghackwrench/F256_Jr_Kernel_DOS&lt;br /&gt;
|-&lt;br /&gt;
|digarok basic stuff&lt;br /&gt;
|Lots of basic examples&lt;br /&gt;
|digarok&lt;br /&gt;
|read github&lt;br /&gt;
|https://github.com/digarok/superbasic-traveler/tree/main&lt;br /&gt;
|-&lt;br /&gt;
|Mu0n&#039;s F256K asm doodles&lt;br /&gt;
|Some asm examples&lt;br /&gt;
|Mu0n&lt;br /&gt;
|read github&lt;br /&gt;
|https://github.com/Mu0n/F256KsimpleASMdoodles&lt;br /&gt;
|-&lt;br /&gt;
|Mu0n&#039;s F256K basic doodles&lt;br /&gt;
|Some basic examples&lt;br /&gt;
|Mu0n&lt;br /&gt;
|read github&lt;br /&gt;
|https://github.com/Mu0n/F256KbasicBASICdoodles&lt;br /&gt;
|-&lt;br /&gt;
|Mu0n&#039;s F256K C doodles&lt;br /&gt;
|Some C examples&lt;br /&gt;
|Mu0n&lt;br /&gt;
|read github&lt;br /&gt;
|https://github.com/Mu0n/F256KsimpleCdoodles&lt;br /&gt;
|-&lt;br /&gt;
|Raúl SQ basic repo&lt;br /&gt;
|F256 SuperBASIC Trigonometry&lt;br /&gt;
|Raúl SQ&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/raul-sq/FoenixF256K2&lt;br /&gt;
|-&lt;br /&gt;
|tcp example&lt;br /&gt;
|connects to a server and gets typed in text echoed back to you&lt;br /&gt;
|gadget&lt;br /&gt;
|$2000&lt;br /&gt;
|https://github.com/ghackwrench/F256_example_tcp&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Software_for_6502&amp;diff=38368</id>
		<title>Software for 6502</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Software_for_6502&amp;diff=38368"/>
		<updated>2026-01-05T18:01:06Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: /* Applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note that when an hex address is given, it&#039;s meant to instruct as to which address to bload or to send (ie foenixmgr python script) the program (ie a .bin file) to before running it. For extra help on how to run .bin files and almost every possible scheme that has to be used to run program, you can consult this video that&#039;s also part of [[Getting Started]], this one: https://www.youtube.com/watch?v=0ShFv89KGDs&lt;br /&gt;
&lt;br /&gt;
Many download links are posts in the main [https://discord.gg/9vjUEGgcUS Foenix Retro Systems discord server] which will require you to join in order to get to them.&lt;br /&gt;
&lt;br /&gt;
A [[Getting Started#Demos Archive|Demo Archive]] was put together in September 2023 to get ready to show to youtubers, some of these are linked once more, in this page.   &lt;br /&gt;
&lt;br /&gt;
There&#039;s also the Foenix Marketplace website maintained by EMWhite with its own collection of articles and software http://apps.emwhite.org/foenixmarketplace/.  &lt;br /&gt;
&lt;br /&gt;
===== Curated SD card collection of games, demos, utilities =====&lt;br /&gt;
Here is a download link to a zip file meant to be extracted into the root of an SD card: https://github.com/Mu0n/F256MiscGoodies/tree/main/SDCard_Collection&lt;br /&gt;
&lt;br /&gt;
Best to wipe out your SD card and start anew with the contents of this extracted to root. Micah&#039;s file manager doesn&#039;t like long lists of files so it really is best to not overdo it. I tried to minimize the files in root, but I couldn&#039;t for everything.&lt;br /&gt;
&lt;br /&gt;
Open the readme.txt file with moreorless to see some instructions about the collection. Best to run /- fm first, then open the readme.txt from it&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|F256 f/term&lt;br /&gt;
|Terminal emulator for F256K and Jr with classic (flat) memory load&lt;br /&gt;
|Micah&lt;br /&gt;
| - fterm.pgZ or use f/manager&lt;br /&gt;
|https://github.com/WartyMN/F256-terminal/blob/main/release/fterm.pgZ&lt;br /&gt;
|-&lt;br /&gt;
|FoenixTarot&lt;br /&gt;
|Tarot card readings in SuperBasic&lt;br /&gt;
|Mike&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/mcassera/FoenixTarot/tree/main&lt;br /&gt;
|-&lt;br /&gt;
|Forthf256&lt;br /&gt;
|Forth implementation&lt;br /&gt;
|Vasyl&lt;br /&gt;
|pgz in its forth/ folder&lt;br /&gt;
|https://github.com/VasylTsv/ForthX16&lt;br /&gt;
|-&lt;br /&gt;
|WildBits Graphic Toolkit&lt;br /&gt;
|(fmr. F256-GraphicToolkit) Sprite editor, Tilemap editor, Font editor + misc tools&lt;br /&gt;
|econtrerasd&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/econtrerasd/F256-GraphicToolkit/releases&lt;br /&gt;
|-&lt;br /&gt;
|TestSuite&lt;br /&gt;
|Test program for Graphics, Math Coprocesor, Joystick &amp;amp; Sound of the F256k &lt;br /&gt;
computer&lt;br /&gt;
|econtrerasd&lt;br /&gt;
|basic&lt;br /&gt;
|[https://github.com/econtrerasd/F256-GraphicToolkit/releases/tag/v1.4 https://github.com/econtrerasd/F256-GraphicToolkit/releases]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Demos ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|badapple&lt;br /&gt;
|A 80x60 textmode port of Bad Apple, uses the VS1053b for quality mp3 audio. Needs a Jr2 or K2!&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz*&lt;br /&gt;
|*unzip badapple.zip into the root of your SD card. If done right, the 3 files within will be in the demos/ folder. The program expects its data file there when it runs. https://github.com/Mu0n/F256MiscGoodies/blob/main/apps/badapple.zip&lt;br /&gt;
|-&lt;br /&gt;
|balls&lt;br /&gt;
|Draw a good quantity of multiplexed sprites, fast. Balls bouncing around&lt;br /&gt;
|celton&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/FoenixRetro/demos/blob/main/MultiplexedSprites.md&lt;br /&gt;
|-&lt;br /&gt;
|F256Archon&lt;br /&gt;
|Splash screen intro, plays MIDI using the SAM2695, requires a K2 or Jr2&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/Mu0n/F256Archon/releases&lt;br /&gt;
|-&lt;br /&gt;
|f256_life&lt;br /&gt;
|An implementation of Conway&#039;s game of life&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/rmsk2/f256_life&lt;br /&gt;
|-&lt;br /&gt;
|F256 Mandelbrot&lt;br /&gt;
|Draws Mandelbrot set fast (5 mins) using coprocessor math. Allows to zoom into the set.&lt;br /&gt;
|mgr42&lt;br /&gt;
|uses basic loader&lt;br /&gt;
|https://github.com/rmsk2/F256_Mandelbrot&lt;br /&gt;
|-&lt;br /&gt;
|F256ShowCase&lt;br /&gt;
|Shows sliding tiling graphics, moves with joystick&lt;br /&gt;
|eriktier&lt;br /&gt;
|$0000&lt;br /&gt;
|https://github.com/pig-games/F256Showcase&lt;br /&gt;
|-&lt;br /&gt;
|fnxmas23 &lt;br /&gt;
|PSG mod music, scrolling text, sound effects, must see demo!&lt;br /&gt;
|dwsJason and digarok&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/Mu0n/F256MiscGoodies/raw/refs/heads/main/apps/xmas24_k2.pgz revised version that can run on wave 2 Jr2 and K2 as well&lt;br /&gt;
|-&lt;br /&gt;
|foenixmas23&lt;br /&gt;
|Xmas 2023 demo with SID music from the classic 1983 C64 xmas demo&lt;br /&gt;
|EMWhite&lt;br /&gt;
|uses basic loader&lt;br /&gt;
|http://apps.emwhite.org/shared-files/815/?foenixmas23.zip&lt;br /&gt;
|-&lt;br /&gt;
|livingworlds&lt;br /&gt;
|Living Worlds, a port of a color cycling by Mark Ferrari, ported here on the F256 by haydenkale&lt;br /&gt;
|haydenkale&lt;br /&gt;
|$0000&lt;br /&gt;
|https://github.com/clandrew/livingworlds/tree/e4532e0d530b76ccb90368fdf5ad10bfa2deeb12&lt;br /&gt;
|-&lt;br /&gt;
|mandel&lt;br /&gt;
|Will draw a mandelbrot set in 3 hours, more useful as a stability test than a useful fractal program&lt;br /&gt;
|Mu0n&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/Mu0n/F256KbasicBASICdoodles?tab=readme-ov-file#fractal&lt;br /&gt;
|-&lt;br /&gt;
|mariobros&lt;br /&gt;
|Tilemap and platformer test based on Mario Bros. (1983)&lt;br /&gt;
|beethead&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/noyen1973/mariobros&lt;br /&gt;
|-&lt;br /&gt;
|wormhole&lt;br /&gt;
|Shows a fast wireframe animation of a wormhole&lt;br /&gt;
|haydenkale&lt;br /&gt;
|pgz or bin at $0000&lt;br /&gt;
|https://github.com/clandrew/wormhole?tab=readme-ov-file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Games ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|bbombers&lt;br /&gt;
|Boulder Bombers (Alpha-2)  Clone of Canyon Bombers&lt;br /&gt;
|Scott (xDraconian)&lt;br /&gt;
|pgx&lt;br /&gt;
atari joystick&lt;br /&gt;
|https://github.com/scttgs0/BoulderBombers&amp;lt;nowiki/&amp;gt;https://github.com/scttgs0/BoulderBombers/releases/tag/alpha_2&lt;br /&gt;
|-&lt;br /&gt;
|Bombsweeper&lt;br /&gt;
|Bomb sweeper port&lt;br /&gt;
|beethead&lt;br /&gt;
|pgz&lt;br /&gt;
|https://discord.com/channels/691915291721990194/855689509520932885/1196352934083035156&lt;br /&gt;
|-&lt;br /&gt;
|Cosmic&lt;br /&gt;
|Shoot &#039;em up&lt;br /&gt;
|beethead&lt;br /&gt;
|pgz&lt;br /&gt;
|https://discordapp.com/channels/691915291721990194/1054250238308790342/1175982979537969214&lt;br /&gt;
|-&lt;br /&gt;
|F256-Trek&lt;br /&gt;
|Updated Trek, with modern F256 Graphics&lt;br /&gt;
|econtrerasd&lt;br /&gt;
|basic&lt;br /&gt;
|[https://github.com/econtrerasd/Trek-F256/releases/tag/v1.0 https://github.com/econtrerasd/Trek-F256/releases]&lt;br /&gt;
|-&lt;br /&gt;
|F256 two to the power of eleven&lt;br /&gt;
|Port of the puzzle game of 2048&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/rmsk2/F256_2048&amp;lt;nowiki/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|fillerup&lt;br /&gt;
|Fill &#039;er Up (WIP)&lt;br /&gt;
Qix-like game&lt;br /&gt;
|Scott (xDraconian)&lt;br /&gt;
|pgx&lt;br /&gt;
atari joystick&lt;br /&gt;
|https://github.com/scttgs0/Fill-er-up&lt;br /&gt;
|-&lt;br /&gt;
|FusionDrive&lt;br /&gt;
|An outrun type game that also plays a MIDI soundtrack&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|wip v0.2, can use a NES pad #1 to move around, or left/right arrow keys currently https://github.com/Mu0n/F256KsimpleCdoodles/tree/main/NoFussDemos&lt;br /&gt;
|-&lt;br /&gt;
|jewelkeeper&lt;br /&gt;
|Sokoban port&lt;br /&gt;
|beethead&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/Mu0n/F256MiscGoodies/raw/refs/heads/main/apps/jewelkeeper.pgz&amp;lt;nowiki/&amp;gt;You can now specify a level file when loading the game &amp;lt;code&amp;gt;/- jewelkeeper.pgz &amp;lt;levels.txt&amp;gt;&amp;lt;/code&amp;gt;.  Find more levels at https://www.sourcecode.se/sokoban/levels.php.  Keep in mind the maximum level dimension is 20x15, anything larger will be ignored&lt;br /&gt;
|-&lt;br /&gt;
|Jr Wördl&lt;br /&gt;
|port of Wordle&lt;br /&gt;
|AgeAgeEye&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/ageageeye/Superbasic-F256Jr-examples&lt;br /&gt;
|-&lt;br /&gt;
|kartdemo&lt;br /&gt;
|Kart racing game&lt;br /&gt;
|SprySloth&lt;br /&gt;
|pgz&lt;br /&gt;
|https://discord.com/channels/691915291721990194/1225217654487253094/1228246780840513556&lt;br /&gt;
|-&lt;br /&gt;
|Lair of the Lich King&lt;br /&gt;
|Rogue like dungeon crawler. Demo has 3 levels; full has 25+&lt;br /&gt;
|Micah&lt;br /&gt;
| - lkdemo/lk.pgz&lt;br /&gt;
|[https://discord.com/channels/691915291721990194/1230670413361844244/1317256215566487593 1.0 Beta 19 Demo]&lt;br /&gt;
|-&lt;br /&gt;
|livewire&lt;br /&gt;
|Livewire (WIP)&lt;br /&gt;
Tempest-like game&lt;br /&gt;
|Scott (xDraconian)&lt;br /&gt;
|pgx&lt;br /&gt;
atari joystick&lt;br /&gt;
|https://github.com/scttgs0/Livewire&lt;br /&gt;
|-&lt;br /&gt;
|Maze-Munch&lt;br /&gt;
|Pac-Man clone&lt;br /&gt;
|SprySloth&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/cmassat/Maze-Munch&lt;br /&gt;
|-&lt;br /&gt;
|pdefense&lt;br /&gt;
|Planetary Defense (WIP)&lt;br /&gt;
|Scott (xDraconian)&lt;br /&gt;
|pgx&lt;br /&gt;
mouse&lt;br /&gt;
atari joystick&lt;br /&gt;
|https://github.com/scttgs0/PlanetaryDefense&lt;br /&gt;
|-&lt;br /&gt;
|Shanghai/Mahjongg&lt;br /&gt;
|A clone of Shanghai. Also known as Mahjongg&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz or KUP&lt;br /&gt;
mouse needed&lt;br /&gt;
|https://github.com/rmsk2/f256_mahjong&lt;br /&gt;
|-&lt;br /&gt;
|Ski-Jr&lt;br /&gt;
|Ski game downhill&lt;br /&gt;
|digarok&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/digarok/superbasic-traveler/blob/main/ski-jr.bas&lt;br /&gt;
|-&lt;br /&gt;
|Track &amp;amp; Field&lt;br /&gt;
|Olympic Game by Konami (WIP)&lt;br /&gt;
|Scott (xDraconian)&lt;br /&gt;
|pgz&lt;br /&gt;
atari joystick or keyboard&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Tetris&lt;br /&gt;
|Good old 80&#039;s game&lt;br /&gt;
|Daniel Tremblay (Grenouye)&lt;br /&gt;
|pgz&lt;br /&gt;
atari joystick or keyboard&lt;br /&gt;
|https://github.com/dtremblay/c256-tetris/tree/f256k&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Game Jam #01 - April 6th/7th 2024 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|15puzzle&lt;br /&gt;
|Number sort puzzle&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/rmsk2/f256_15puzzle/releases&amp;lt;nowiki/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Flight Simulator&lt;br /&gt;
|flying simulator&lt;br /&gt;
|sduensin&lt;br /&gt;
|pgz&lt;br /&gt;
|https://cdn.discordapp.com/attachments/1225481966200029286/1227764847819620454/shotel.pgz&lt;br /&gt;
|-&lt;br /&gt;
|frisbee&lt;br /&gt;
|Frisbee throw past sport game&lt;br /&gt;
|dwsJason&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/dwsJason/f256/blob/develop/merlin32/frisbee/frisbee.pgz&lt;br /&gt;
|-&lt;br /&gt;
|Impasse&lt;br /&gt;
|Shoot &#039;em up&lt;br /&gt;
|digarok&lt;br /&gt;
|pgz&lt;br /&gt;
|https://discord.com/channels/691915291721990194/1225481966200029286/1227075699895046235&lt;br /&gt;
|-&lt;br /&gt;
|soccur&lt;br /&gt;
|mutliplayer game of soccer&lt;br /&gt;
|beethead&lt;br /&gt;
|pgz&lt;br /&gt;
|executable:https://discord.com/channels/691915291721990194/1225481966200029286/1226808228948611184&lt;br /&gt;
source code:&lt;br /&gt;
https://discord.com/channels/691915291721990194/1225481966200029286/1226812472069980232&lt;br /&gt;
|-&lt;br /&gt;
|Trek&lt;br /&gt;
|port of classic Star Trek game&lt;br /&gt;
|contrerasd&lt;br /&gt;
|basic&lt;br /&gt;
|https://discord.com/channels/691915291721990194/1225481966200029286/1226727849944289341&lt;br /&gt;
|-&lt;br /&gt;
|Typing Star&lt;br /&gt;
|typing reaction game&lt;br /&gt;
|haydenkale&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/clandrew/typestar&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Game Jam #02 - October 25th-November 1st 2024 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|Bach&#039;s MIDI Hero&lt;br /&gt;
|Free MIDI/PSG play + note play tutorial&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
the MIDI feature requires a F256K2 or F256Jr2; a legacy PSG option also allows F256K and F256Jr to still hear it. Optionally uses a MIDI in controller plugged in.&lt;br /&gt;
|https://github.com/Mu0n/F256KsimpleCdoodles/releases/download/v1.2/BachHero.pgz&lt;br /&gt;
|-&lt;br /&gt;
|f256_snake&lt;br /&gt;
|&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz. Use cursor keys, Atari joystick or SNES pad to play&lt;br /&gt;
|https://github.com/rmsk2/f256_snake&lt;br /&gt;
|-&lt;br /&gt;
|fnxsnake&lt;br /&gt;
|&lt;br /&gt;
|silk-neon&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/ksiondag/fnxsnake&lt;br /&gt;
|-&lt;br /&gt;
|The Hallow&lt;br /&gt;
|&lt;br /&gt;
|beethead&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/noyen1973/FoenixGameJamOct2024&lt;br /&gt;
|-&lt;br /&gt;
|Halloween Birthday&lt;br /&gt;
|&lt;br /&gt;
|SprySloth&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/cmassat/GameJam2024_F256K&lt;br /&gt;
|-&lt;br /&gt;
|Haunted Mansion&lt;br /&gt;
|&lt;br /&gt;
|digarok&lt;br /&gt;
|superbasic&lt;br /&gt;
|https://github.com/digarok/fnxgamejam-haunted-mansion&lt;br /&gt;
|-&lt;br /&gt;
|Kooyan&lt;br /&gt;
|&lt;br /&gt;
|Grenouye&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/dtremblay/kooyan.git&lt;br /&gt;
|-&lt;br /&gt;
|Spooky Run&lt;br /&gt;
|&lt;br /&gt;
|dwsJason&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/dwsJason/spooky&lt;br /&gt;
|-&lt;br /&gt;
|Trick or Treat&lt;br /&gt;
|&lt;br /&gt;
|Mike&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/mcassera/TrickOrTreat&lt;br /&gt;
|-&lt;br /&gt;
|Ultima III - Exodus&lt;br /&gt;
|port&lt;br /&gt;
|Minstrel Dragon&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/minstreldragon/F256_Ultima_3&lt;br /&gt;
|-&lt;br /&gt;
|Warlock&lt;br /&gt;
|remake of 68000 game&lt;br /&gt;
|xDraconian&lt;br /&gt;
|pgz&lt;br /&gt;
atari joystick&lt;br /&gt;
DOWN=change_level&lt;br /&gt;
UP=jump&lt;br /&gt;
UP-LEFT=leap&lt;br /&gt;
UP-RIGHT=leap&lt;br /&gt;
|https://github.com/scttgs0/Foenix_GameJam_Oct2024&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Game Jam #03 - April 18th-April 27th 2025 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|Arcade Shanghai v1.2&lt;br /&gt;
|Shanghai clone&lt;br /&gt;
|contrerasd&lt;br /&gt;
|basic, keep the .bas program in root, the rest in the provided ashanghai/ folder&lt;br /&gt;
|https://github.com/econtrerasd/ashanghai/releases&lt;br /&gt;
|-&lt;br /&gt;
|Bawk Bawk Cluck Cluck&lt;br /&gt;
|Chicken themed platformer&lt;br /&gt;
|beethead&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/noyen1973/FoenixGameJamApr2025&lt;br /&gt;
|-&lt;br /&gt;
|BitLadder&lt;br /&gt;
|Shoot &#039;Em Up&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz. For full sound compatibility, a Jr2 or K2 is needed. &lt;br /&gt;
Uses 4 sound chips! (PSG, SID, OPL3, MIDI)&lt;br /&gt;
|https://mu0n.itch.io/bitladder&lt;br /&gt;
|-&lt;br /&gt;
|F256_Commando&lt;br /&gt;
|Commando port&lt;br /&gt;
|SprySloth&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/cmassat/F256_Commando&lt;br /&gt;
|-&lt;br /&gt;
|F256_LodeRunner&lt;br /&gt;
|Lode Runner port&lt;br /&gt;
|Minstrel Dragon&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/minstreldragon/F256_Loderunner/releases&lt;br /&gt;
|-&lt;br /&gt;
|Mahjong&lt;br /&gt;
|Shangai clone&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/rmsk2/f256_mahjong/releases&lt;br /&gt;
|-&lt;br /&gt;
|Quarth&lt;br /&gt;
|Block placement arcade game&lt;br /&gt;
|Grenouye&lt;br /&gt;
|pgz&lt;br /&gt;
|https://grenouye.itch.io/f256-quarth&lt;br /&gt;
|-&lt;br /&gt;
|Skee(ster)-Ball&lt;br /&gt;
|&lt;br /&gt;
|Mike&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/mcassera/skeeball256/tree/main&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Game Jam #04 - November-December 2025 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|Fallitaire&lt;br /&gt;
|A cozy fall-themed twist on Pyramid Solitaire, built for the Foenix F256K2 Game Jam!&lt;br /&gt;
|Programmer Vs World&lt;br /&gt;
|bas&lt;br /&gt;
|https://programmervsworld.itch.io/fallitaire&lt;br /&gt;
|-&lt;br /&gt;
|H.E.R.O.&lt;br /&gt;
|Port of the classic game H.E.R.O.&lt;br /&gt;
|Cibee&lt;br /&gt;
|pgz&lt;br /&gt;
|https://c1bee.itch.io/hero&lt;br /&gt;
|-&lt;br /&gt;
|Leaderboard&lt;br /&gt;
|Golf game&lt;br /&gt;
|xDraconian&lt;br /&gt;
|pgz&lt;br /&gt;
|https://discord.com/channels/691915291721990194/1424187774642290799/1456104940186501132&lt;br /&gt;
|-&lt;br /&gt;
|Pitfall&lt;br /&gt;
|Port of the classic Pitfall game from Activision&lt;br /&gt;
|MinstrelDragon&lt;br /&gt;
|pgz&lt;br /&gt;
|https://minstrel.itch.io/pitfall-foenix-f256x&lt;br /&gt;
|-&lt;br /&gt;
|Return of the Falcon&lt;br /&gt;
|&lt;br /&gt;
|Callisto&lt;br /&gt;
|TBD&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Swicheroo&lt;br /&gt;
|An Alternate Puzzle Game&lt;br /&gt;
|jbaker8935&lt;br /&gt;
|pgz&lt;br /&gt;
|https://jbaker8935.itch.io/switcheroo&lt;br /&gt;
|-&lt;br /&gt;
|Track Day&lt;br /&gt;
|v1.0 top down race game vs computer controlled opponents&lt;br /&gt;
|MikeC&lt;br /&gt;
|pgz&lt;br /&gt;
|https://mcassera.itch.io/track-day-racing&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Music ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|cozyMIDI&lt;br /&gt;
|Plays a SMF with the SAM2695 or VS1053b &lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|cozyMIDI v2.4 can open and play type 0 and type 1 standard MIDI files (SMF)&lt;br /&gt;
needs a Jr2 or K2&lt;br /&gt;
with a 2x core at https://github.com/Mu0n/F256KsimpleCdoodles/tree/main/NoFussDemos&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
run operation 1: just as itself, it will force you to pick a midi file in the &#039;midi/&#039; folder /- cozymidi&lt;br /&gt;
&lt;br /&gt;
run operation 2: in f/manager, if you put this as &amp;lt;code&amp;gt;midiplayer.pgz&amp;lt;/code&amp;gt;in the &#039;_apps/&#039; folder, f/manager will open midi file with it when you launch .mid files. &lt;br /&gt;
&lt;br /&gt;
Program link: https://github.com/Mu0n/F256KsimpleCdoodles/raw/refs/heads/main/NoFussDemos/cozymidi.pgz&lt;br /&gt;
|-&lt;br /&gt;
|digestMidi&lt;br /&gt;
|converts .mid to .dim&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|.mid files are slow to load, parse and prepare for a playback. This tool comes in to convert them into a .dim format that strips out unnecessary MIDI commands and sets it up for timer0 time delays. Works with type 0 and type 1 standard midi files. This tools does the conversion and lets you hear the result.&lt;br /&gt;
Find the latest version here: https://github.com/Mu0n/F256MiscGoodies/tree/main/apps&lt;br /&gt;
|-&lt;br /&gt;
|EdInHisLib&lt;br /&gt;
|SID+OPL3 simultaneously&lt;br /&gt;
|beethead, ported from xantax&lt;br /&gt;
|pgz&lt;br /&gt;
|F256 port: https://discordapp.com/channels/691915291721990194/1054249926521016392/1184413356598231120&lt;br /&gt;
original: &amp;lt;nowiki&amp;gt;https://csdb.dk/release/?id=170898&amp;lt;/nowiki&amp;gt;. Not 100% accurate but close.&lt;br /&gt;
|-&lt;br /&gt;
|F256amp&lt;br /&gt;
|mp3, ogg, wav, wma file playback&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|(aka audioplayer.pgz) v2.3 Needs a Jr.2 or K2 since it uses the VS1053b chip.&lt;br /&gt;
For a starter collection of .mp3 and other audio files, check the SD curated collection here: https://github.com/Mu0n/F256MiscGoodies/tree/main/SDCard_Collection&lt;br /&gt;
run operation 1: just as itself, it will force you to pick an audio file. it expects a &amp;lt;code&amp;gt;media/mp3/&amp;lt;/code&amp;gt; folder, but it can live without it and peek into the root instead. &lt;br /&gt;
&lt;br /&gt;
run operation 2: with an argument, it will auto-play it: /- f256amp yourmp3file.mp3 &lt;br /&gt;
&lt;br /&gt;
run operation 3:  in f/manager, if you put this as &amp;lt;code&amp;gt;audioplayer.pgz&amp;lt;/code&amp;gt; in the &#039;_apps/&#039; folder. This lets f/manager automatically open up .mp3, .wav, .ogg, .wma that you press enter on.&lt;br /&gt;
&lt;br /&gt;
Program link: https://github.com/Mu0n/F256KsimpleCdoodles/raw/refs/heads/main/NoFussDemos/f256amp.pgz&lt;br /&gt;
|-&lt;br /&gt;
|FireJam&lt;br /&gt;
|all chips, music playing with MIDI in&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|v1.2 MIDI in and out capable, it will still partially work with a Jr. (PSG, and SID if you have them), a K (PSG, SID, OPL3) and the newest wave 2 Jr2 and K2 (PSG, SID, OPL3, SAM, VS1053b).&lt;br /&gt;
Best to use with a MIDI in controller, but it&#039;ll be controllable with arrows and space to make notes individually, or the F keys to start beats. https://github.com/Mu0n/F256KsimpleCdoodles/tree/main/NoFussDemos&lt;br /&gt;
|-&lt;br /&gt;
|jrtracker&lt;br /&gt;
|Tracker based in basic and uses the PSG&lt;br /&gt;
(considered obsolete, use tracker2)&lt;br /&gt;
|contrerasd&lt;br /&gt;
|basic&lt;br /&gt;
|https://ptb.discord.com/channels/691915291721990194/1008139105386889346/1188292876984143983&lt;br /&gt;
|-&lt;br /&gt;
|modo&lt;br /&gt;
|MOD player using the PSG&lt;br /&gt;
|dwsJason and digarok&lt;br /&gt;
|pgz&lt;br /&gt;
|https://discordapp.com/channels/691915291721990194/855689509520932885/1190723114661859429&lt;br /&gt;
|-&lt;br /&gt;
|Musik&lt;br /&gt;
|Music piece demo using MIDI&lt;br /&gt;
|Mike&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/mcassera/Musik/blob/main/Musik.PGZ&amp;lt;nowiki/&amp;gt;Musikalisches Würfelspiel&lt;br /&gt;
Requires a Jr2 or K2 since it uses MIDI&lt;br /&gt;
|-&lt;br /&gt;
|opl3snooper&lt;br /&gt;
|playback of VGM files (that use opl2 and opl3) and MIDI in&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|v1.0  mainly plays back vgm files, but you can pause it and snoop around the channel instruments and play up to 18 note polyphony with MIDI in. expects a collection in media/vgm/, or it will browse from the root if it can&#039;t find.  &lt;br /&gt;
It can load a .spl (Simple PLaylist) text file, which is one file per line, including their respective paths. &lt;br /&gt;
Requires a Jr2 or K2 with a 2x core to use the extra bank of SRAM.&lt;br /&gt;
For a starter collection of .vgm files, check the SD curated collection here: https://github.com/Mu0n/F256MiscGoodies/tree/main/SDCard_Collection&lt;br /&gt;
run operation 1: just as itself, it will force you to pick a midi file in the &#039;media/vgm/&#039; folder &lt;br /&gt;
&lt;br /&gt;
run operation 2: in f/manager (v1.1b9 and up), if you put this as &amp;lt;code&amp;gt;vgmplayer.pgz&amp;lt;/code&amp;gt;in the &#039;_apps/&#039; folder, f/manager will open midi file with it when you launch .vgm files. &lt;br /&gt;
&lt;br /&gt;
Program link: https://github.com/Mu0n/F256KsimpleCdoodles/raw/refs/heads/main/NoFussDemos/opl3snooper.pgz &lt;br /&gt;
|-&lt;br /&gt;
|opl3tweak&lt;br /&gt;
|uses MIDI in, plays 18 channels polyphony in real time to the YMF262 OPL3. Fish for random register values.&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|v0.1. Can&#039;t save or load instrument definitions yet. Needs a K2 with a MIDI in currently.  https://github.com/Mu0n/F256KsimpleCdoodles/raw/refs/heads/main/NoFussDemos/opl3tweak.pgz&lt;br /&gt;
Arrows to move around, + and - keys to incr/decr values or type in a hex value directly under the highlighted position.&lt;br /&gt;
|-&lt;br /&gt;
|piano&lt;br /&gt;
|Plays some PSG notes with the keyboard&lt;br /&gt;
|Mu0n&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/Mu0n/F256KbasicBASICdoodles?tab=readme-ov-file#pulse-sound-generator-piano&lt;br /&gt;
|-&lt;br /&gt;
|playvgm&lt;br /&gt;
|plays a headless vgm file with OPL3&lt;br /&gt;
|G33kyAndIKnowIt&lt;br /&gt;
|pgx&lt;br /&gt;
|https://github.com/natebarney/playvgm-f256k&lt;br /&gt;
some example music files can be gotten from this post:&lt;br /&gt;
[https://discord.com/channels/691915291721990194/975117322836656138/1220366429640065074 https://discord.com/channels/6][https://discord.com/channels/691915291721990194/975117322836656138/1220366429640065074 91915291721990194/975117322836656138/1220366429640065074]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) open a normal .vgm into a hex editor &amp;lt;nowiki/&amp;gt;and cut out the header bytes from 0x00 to 0x&amp;lt;nowiki/&amp;gt;FF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) run by first using superbasic&#039;s &#039;&#039;&#039;&#039;&#039;bload&#039;&#039;&#039;&#039;&#039; &#039;&#039;&#039;&#039;&#039;&amp;quot;yourmusicfile&amp;quot;, $01000&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
followed by running this program with &#039;&#039;&#039;&#039;&#039;/- playvgm.pgx&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|sidtweak&lt;br /&gt;
|uses MIDI in, plays 6 channels polyphony in real time to the dual SID. Fish for random register values.&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|v0.1. Can&#039;t save or load instrument definitions yet. Needs a K2 with a MIDI in currently. https://github.com/Mu0n/F256KsimpleCdoodles/raw/refs/heads/main/NoFussDemos/sidtweak.pgz&lt;br /&gt;
Arrows to move around, + and - keys to incr/decr values or type in a hex value directly under the highlighted position.&lt;br /&gt;
|-&lt;br /&gt;
|rawsidplayer&lt;br /&gt;
|plays raw PSID files from the HVSC collection, converted by zigreSID&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|(formely psidplayer) v0.2 find rawsidplayer.pgz and a starter .rsd file (raw sid dumps). For a starter collection of .rsd files, check the SD curated collection here: https://github.com/Mu0n/F256MiscGoodies/tree/main/SDCard_Collection &lt;br /&gt;
extract sid.zip into a folder /sid/ in the root of your SD card, that&#039;s where psidplayer.pgz will first look to let you pick a file. failing that, it will fall back to the root folder and let you navigate.&lt;br /&gt;
&lt;br /&gt;
program link:&lt;br /&gt;
&lt;br /&gt;
https://github.com/Mu0n/F256KsimpleCdoodles/raw/refs/heads/main/NoFussDemos/rawsidplayer.pgz&lt;br /&gt;
|-&lt;br /&gt;
|tracker2 v1.5&lt;br /&gt;
|Like jrtracker.bas, but using both PSGs&lt;br /&gt;
|contrerasd&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/econtrerasd/Tracker2/releases&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Uti&amp;lt;nowiki/&amp;gt;lities ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Descrip&amp;lt;nowiki/&amp;gt;tion&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|basic2text&lt;br /&gt;
|A simple utility for translating Commodore BASIC (all variants) from its native tokenized file format to a text format that can be opened with SuperBASIC. Does not perform any code translation: all adaptation is up to you. &lt;br /&gt;
|Micah&lt;br /&gt;
|pgZ&lt;br /&gt;
|https://github.com/WartyMN/F256-BasText/releases/latest&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|dcopy&lt;br /&gt;
|A tool to copy files from one drive to another or to/from your PC via RS-232 and a nullmodem cable&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz/flash&lt;br /&gt;
|https://github.com/rmsk2/f256_dcopy&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|f/manager&lt;br /&gt;
|A general file utility, launcher, and memory viewing program. Dual-panel file/memory browsers; copy between disks,  between folders on same disk, and from memory to disk and vice versa; delete, rename, and duplicate files; view files as hex or text (with word-wrap); launch applications and known file types; set the RTC clock; search in RAM and flash. Works with internal SD card and IEC devices such as FNX1591 and Commodore 1541. Can be installed in primary flash position ahead of SuperBASIC or DOS, or at a higher location. Can also be run from disk with &amp;quot;- fm.pgz&amp;quot;.&lt;br /&gt;
|Micah&lt;br /&gt;
|pgZ/flash&lt;br /&gt;
|https://github.com/WartyMN/F256-FileManager/releases&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|f256_reset&lt;br /&gt;
|A small utility that lets you reset the machine through this piece of flash software&lt;br /&gt;
|mgr42&lt;br /&gt;
|flash&lt;br /&gt;
|https://github.com/rmsk2/f256_reset&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|fcart&lt;br /&gt;
|A program that allows to write data to flash expansion cartridges &lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz, on-board and cartridge flash&lt;br /&gt;
|https://github.com/rmsk2/cartflash&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|flashcart&lt;br /&gt;
|Allows to wipe a block of flash or write a program to a flash cart, from this basic program from the F256Jr/K&lt;br /&gt;
|redfool.&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/Red-Fool/F256_FlashCart/tree/main&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|flashselect&lt;br /&gt;
|Allows to select a program to start from a flash cartridge via a menu&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz, on-board and cartridge flash&lt;br /&gt;
|https://github.com/rmsk2/flashselect&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|fonts&lt;br /&gt;
|A variety of fonts using the standard F256 character set arrangement. Load with the F256 file manager (f/manager), or your own code.&lt;br /&gt;
|Micah&lt;br /&gt;
|(not a program)&lt;br /&gt;
|[https://github.com/WartyMN/Foenix-Fonts/tree/main https://github.com/WartyMN/Foenix-Fonts]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|midiStuff&lt;br /&gt;
|Test program for a F256K2 or F256Jr2 that sends MIDI data to the internal sam2695 dream chip that produces MIDI based audio. Also test a keyboard controller plugged in the MIDI in port.&lt;br /&gt;
|Mu0n&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/Mu0n/F256KsimpleCdoodles/blob/main/README.md#midistuff&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|moreorless&lt;br /&gt;
|A text editor for the Foenix 256 line of computers&lt;br /&gt;
|mgr42&lt;br /&gt;
|pgz&lt;br /&gt;
|https://github.com/rmsk2/moreorless/releases/&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|pgz2flash&lt;br /&gt;
|A program for your Linux, Windows or MacOS machine to turn any PGZ or SuperBASIC program into a KUP which can be run from cartridge or onboard flash memory&lt;br /&gt;
|mgr42&lt;br /&gt;
|Executable for modern computers&lt;br /&gt;
|https://github.com/rmsk2/pgz2flash&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sidTester&lt;br /&gt;
|Simple superbasic program that tests out all 3 voices of the SID1 on the Jr (if populated), K, Jr2 and K2. Ported by Mu0n, made by andy on HackJunk.com https://hackjunk.com/2017/11/07/commodore-64-sid-tester/&lt;br /&gt;
|andy&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/Mu0n/F256MiscGoodies/blob/main/apps/sidtester.bas&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|testsuite.bas&lt;br /&gt;
|a series of tests for your F256, video modes and sound chips&lt;br /&gt;
|econtrerasd&lt;br /&gt;
|basic&lt;br /&gt;
|run from the root, https://raw.githubusercontent.com/Mu0n/F256MiscGoodies/refs/heads/main/apps/testsuite.bas&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|wget&amp;lt;nowiki/&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki/&amp;gt;fetches a file from a http address if you have a network connection active. Works with the K and Jr. ESP32 Feather &#039;huzzah&#039; board. Not meant to be used with the K2 and Jr2 Wiznet chip.&lt;br /&gt;
|gadget&lt;br /&gt;
|&amp;lt;nowiki/&amp;gt;pgz/flash&lt;br /&gt;
|https://github.com/ghackwrench/F256_wget&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample Code ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Program&lt;br /&gt;
!Description&lt;br /&gt;
!Author&lt;br /&gt;
!Notes on running&lt;br /&gt;
!Link&lt;br /&gt;
|-&lt;br /&gt;
|Assembly examples&lt;br /&gt;
|Sample programs for several features of the Foenix F256K and Jr.&lt;br /&gt;
|mgr42&lt;br /&gt;
|read github&lt;br /&gt;
|https://github.com/rmsk2/Hello_Foenix256_Jr/blob/main/testprogs.md&lt;br /&gt;
|-&lt;br /&gt;
|cc65 example&lt;br /&gt;
|c example code&lt;br /&gt;
|gadget&lt;br /&gt;
|read github&lt;br /&gt;
|https://github.com/ghackwrench/F256_Jr_Kernel_DOS&lt;br /&gt;
|-&lt;br /&gt;
|digarok basic stuff&lt;br /&gt;
|Lots of basic examples&lt;br /&gt;
|digarok&lt;br /&gt;
|read github&lt;br /&gt;
|https://github.com/digarok/superbasic-traveler/tree/main&lt;br /&gt;
|-&lt;br /&gt;
|Mu0n&#039;s F256K asm doodles&lt;br /&gt;
|Some asm examples&lt;br /&gt;
|Mu0n&lt;br /&gt;
|read github&lt;br /&gt;
|https://github.com/Mu0n/F256KsimpleASMdoodles&lt;br /&gt;
|-&lt;br /&gt;
|Mu0n&#039;s F256K basic doodles&lt;br /&gt;
|Some basic examples&lt;br /&gt;
|Mu0n&lt;br /&gt;
|read github&lt;br /&gt;
|https://github.com/Mu0n/F256KbasicBASICdoodles&lt;br /&gt;
|-&lt;br /&gt;
|Mu0n&#039;s F256K C doodles&lt;br /&gt;
|Some C examples&lt;br /&gt;
|Mu0n&lt;br /&gt;
|read github&lt;br /&gt;
|https://github.com/Mu0n/F256KsimpleCdoodles&lt;br /&gt;
|-&lt;br /&gt;
|Raúl SQ basic repo&lt;br /&gt;
|F256 SuperBASIC Trigonometry&lt;br /&gt;
|Raúl SQ&lt;br /&gt;
|basic&lt;br /&gt;
|https://github.com/raul-sq/FoenixF256K2&lt;br /&gt;
|-&lt;br /&gt;
|tcp example&lt;br /&gt;
|connects to a server and gets typed in text echoed back to you&lt;br /&gt;
|gadget&lt;br /&gt;
|$2000&lt;br /&gt;
|https://github.com/ghackwrench/F256_example_tcp&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38294</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38294"/>
		<updated>2025-12-12T04:35:14Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: /* Square Root */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;    &lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;    &lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;    &lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;    &lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;    &lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is to use this routine to print at a certain X,Y coordinate onscreen. Oh you are not not using an 80 column screen mode?, don&#039;t worry the routine will compensate automagically!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&amp;lt;br&amp;gt;&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&amp;lt;br&amp;gt;&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Square Root =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to calculate the square root of a number, it&#039;s very useful for a few algorithms, be aware that it will only work on numbers below 32768, square root is returned on the variable - &#039;&#039;guess#&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;Newton&#039;s Method of Calculating Square Root&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc sqr(n)&amp;lt;br&amp;gt;&lt;br /&gt;
n#=n:guess#=n#&amp;lt;br&amp;gt;&lt;br /&gt;
while (0.001&amp;lt;abs(guess#*guess#-n#))&amp;lt;br&amp;gt;&lt;br /&gt;
guess#=(guess#+n/guess#)/2&amp;lt;br&amp;gt;&lt;br /&gt;
wend&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Calculate SIN of an angle =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Raúl (RaúlSQ in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
50 input &amp;quot;Enter an angle in degrees (float): &amp;quot;;d#&amp;lt;br&amp;gt;&lt;br /&gt;
100 sin(d#)&amp;lt;br&amp;gt;&lt;br /&gt;
150 end&amp;lt;br&amp;gt;&lt;br /&gt;
1200 proc sin(s#)&amp;lt;br&amp;gt;&lt;br /&gt;
1250 deg_to_rad#=0.01745329&amp;lt;br&amp;gt;&lt;br /&gt;
1260 s#=s#*deg_to_rad#&amp;lt;br&amp;gt;&lt;br /&gt;
1300 x=6: rem &amp;quot;Factorial of 3&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1400 y=120: rem &amp;quot;Factorial of 5&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1500 z=5040: rem &amp;quot;Factorial of 7&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1600 pow2#=s#*s#:q#=pow2#*s#: rem &amp;quot;Power of 3&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1700 r#=q#*pow2#: rem &amp;quot;Power of 5&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1800 t#=r#*pow2#: rem &amp;quot;Power of 7&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1900 sine#=s#-(q#/x)+(r#/y)-(t#/z)&amp;lt;br&amp;gt;&lt;br /&gt;
2000 print sine#&amp;lt;br&amp;gt;&lt;br /&gt;
2100 endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Calculate COS of an angle =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Raúl (RaúlSQ in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
50    input &amp;quot;Enter an angle in degrees (float): &amp;quot;;d#&amp;lt;br&amp;gt;&lt;br /&gt;
100   cos(d#)&amp;lt;br&amp;gt;&lt;br /&gt;
150   end&amp;lt;br&amp;gt;&lt;br /&gt;
1200  proc cos(s#)&amp;lt;br&amp;gt;&lt;br /&gt;
1250  deg_to_rad#=0.01745329&amp;lt;br&amp;gt;&lt;br /&gt;
1260  s#=s#*deg_to_rad#&amp;lt;br&amp;gt;&lt;br /&gt;
1300  x=2:rem &amp;quot;Factorial of 2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1400  y=24:rem &amp;quot;Factorial of 4&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1500  z=720:rem &amp;quot;Factorial of 6&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1600  q#=s#*s#:rem &amp;quot;Power of 2&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1700  r#=q#*q#:rem &amp;quot;Power of 4&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1800  t#=r#*q#:rem &amp;quot;Power of 6&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1900  cosine#=1-(q#/x)+(r#/y)-(t#/z)&amp;lt;br&amp;gt;&lt;br /&gt;
2000  print cosine#&amp;lt;br&amp;gt;&lt;br /&gt;
2100  endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Loading and Launching another SUPERBASIC program =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say that you want to do a menu or intro in a SUPERBASIC program and then after it plays out or you select something this program loads and executes another SUPERBASIC program!, sounds impossible?, no it&#039;s not, it&#039;s actually easy, we can use the functionality of SUPERBASIC that allows you to create your BASIC program (text file) on your PC and transfer it and execute it in your Foenix computer. (I bet you didn&#039;t know you could do that!).  Use these two lines to load and execute your program, obviously this erases the current program from memory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
memcopy $28000,$8000 poke 0: rem &amp;quot;Clear transfer area for new program&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
a$=&amp;quot;Program.bas&amp;quot;:bload a$,$28000:xgo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Renumbering a Program ====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Mike (mcassera in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a down and dirty basic routine you can use to renumber your program. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
1000 rem &amp;quot;SuperBASIC renum routine&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1010 a=$2000:b=1000:c=10&amp;lt;br&amp;gt;&lt;br /&gt;
1020 while peek(a)&amp;lt;&amp;gt;0&amp;lt;br&amp;gt;&lt;br /&gt;
1030 print peekw(a+1);&amp;quot; --&amp;gt; &amp;quot;;b&amp;lt;br&amp;gt;&lt;br /&gt;
1040 pokew a+1,b&amp;lt;br&amp;gt;&lt;br /&gt;
1050 b=b+c&amp;lt;br&amp;gt;&lt;br /&gt;
1060 a=a+peek(a)&amp;lt;br&amp;gt;&lt;br /&gt;
1070 wend &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;blockquote&amp;gt;&#039;a&#039; is the memory location of the basic line&lt;br /&gt;
&lt;br /&gt;
&#039;b&#039; is the new line number&lt;br /&gt;
&lt;br /&gt;
&#039;c&#039; is the interval between new line numbers&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This little program just goes around and changes the word value that hold line numbers. This does not fix any GOTO or GOSUB statements, you&#039;ll have to update those on your own. (Use at your own risk).&lt;br /&gt;
&lt;br /&gt;
==== Getting a Directory from BASIC ====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Mike (mcassera in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I had written an ML program to work with BASIC to dump the directory into memory so I could then copy the filenames into an array. I&#039;ve pulled it out here for a simple basic program you could use in your program.  I&#039;ve only extracted the names because at the time I didn&#039;t need file sizes. The basic program just prints the directory to the screen but you could modify it to place the names in an array&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The machine language routine can be obtained from the following link:&lt;br /&gt;
https://github.com/mcassera/get_dir/blob/5bb017985793c89455746616493f092ef6a47045/get_dir.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sample BASIC code is here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
10    bload &amp;quot;get_dir.bin&amp;quot;,$7F00&amp;lt;BR&amp;gt;&lt;br /&gt;
15    buffer=$7700:buffloc=$7FBB&amp;lt;BR&amp;gt;&lt;br /&gt;
20    directory(buffer,0,&amp;quot;&amp;quot;)&amp;lt;BR&amp;gt;&lt;br /&gt;
30    for n=buffer to peekw(buffloc)&amp;lt;BR&amp;gt;&lt;br /&gt;
40    cprint chr$(peek(n));&amp;lt;BR&amp;gt;&lt;br /&gt;
50    if peek(n)=0 then print &amp;lt;BR&amp;gt;&lt;br /&gt;
60    next &amp;lt;BR&amp;gt;&lt;br /&gt;
70    print &amp;lt;BR&amp;gt;&lt;br /&gt;
80    end &amp;lt;BR&amp;gt;&lt;br /&gt;
1000  proc directory(loc,len,path$)&amp;lt;BR&amp;gt;&lt;br /&gt;
1010  buffloc=$7FBB&amp;lt;BR&amp;gt;&lt;br /&gt;
1020  pathlength=$7FBD&amp;lt;BR&amp;gt;&lt;br /&gt;
1030  pathloc=$7FBE&amp;lt;BR&amp;gt;&lt;br /&gt;
1040  getdir=$7F00&amp;lt;BR&amp;gt;&lt;br /&gt;
1050  pokew buffloc,loc&amp;lt;BR&amp;gt;&lt;br /&gt;
1060  poke pathlength,len&amp;lt;BR&amp;gt;&lt;br /&gt;
1070  for n=0 to len&amp;lt;BR&amp;gt;&lt;br /&gt;
1080  poke pathloc+n,asc(mid$(path$,n+1,1))&amp;lt;BR&amp;gt;&lt;br /&gt;
1090  next &amp;lt;BR&amp;gt;&lt;br /&gt;
1100  call getdir&amp;lt;BR&amp;gt;&lt;br /&gt;
1120  endproc &amp;lt;BR&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Code Explanation&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The basic program loads the binary and sets aside 2k of ram below BASIC rom for the directory buffer. &lt;br /&gt;
* Line 20 is where you call the directory routine. You send the buffer info (already set), the length of your path (if not reading the main directory) and the path.&lt;br /&gt;
* So if I was reading a directory called &#039;bitmaps&#039; the command would change to :  directory(buffer,7,&amp;quot;bitmaps&amp;quot;) &lt;br /&gt;
* Lines 30 to 60 print the directory from memory. This is where you could read the data into an array. Files are separated with a zero byte hence line 50.&lt;br /&gt;
* The file names are stored in memory $7700 to $7eff. You can change the buffer location by changing the value of buffer in line 15, but 2k of ram will be cleared out after that address. &lt;br /&gt;
* The rest of the variables are (buffloc, pathlength,pathloc,getdir) are used by the ML routine and will break it if changed&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=FPGA_Upgrade_Guide_(F256JrJr)&amp;diff=38153</id>
		<title>FPGA Upgrade Guide (F256JrJr)</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=FPGA_Upgrade_Guide_(F256JrJr)&amp;diff=38153"/>
		<updated>2025-07-06T04:29:20Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: /* Install Vivado Lab Soltions - 2023.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Upgrading the FPGA on F256JrJr can be done using the built-in USB Type-C port. Plug JrJr into your computer and turn it on, then follow the steps below that are specific to your operating system.&lt;br /&gt;
&lt;br /&gt;
== Linux and macOS ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;macOS Note:&#039;&#039;&#039; The default USB serial driver on macOS has issues sometimes with the chip used on JrJr. If you encounter any issues upgrading the FPGA firmware, you can try using FTDI&#039;s driver, available here: [https://ftdichip.com/drivers/vcp-drivers]&lt;br /&gt;
&lt;br /&gt;
=== Using openFPGALoader ===&lt;br /&gt;
[https://github.com/trabucayre/openFPGALoader &#039;&#039;&#039;openFPGALoader&#039;&#039;&#039;] is the easiest way to upgrade the firmware on JrJr. The following steps explain how to upgrade the FPGA firmware on JrJr using openFPGALoader.&lt;br /&gt;
# Install openFPGALoader&lt;br /&gt;
#: The &amp;lt;code&amp;gt;openfpgaloader&amp;lt;/code&amp;gt; package is available on several of the most common Linux distros (including Ubuntu, Arch, and Fedora) and is also available on Homebrew for macOS. &lt;br /&gt;
#: If you can&#039;t install it through your package manager, other options for installing openFPGALoader can be found here: [https://trabucayre.github.io/openFPGALoader/guide/install.html]&lt;br /&gt;
# Run openFPGALoader&lt;br /&gt;
#: The following command will upgrade the firmware. Replace &amp;lt;code&amp;gt;&amp;lt;firmware&amp;gt;&amp;lt;/code&amp;gt; with the path to the FPGA firmware file you downloaded.&lt;br /&gt;
#: &amp;lt;code&amp;gt;openFPGALoader -c ft4232 --fpga-part xc7a35tcsg324 -f &amp;lt;firmware&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
In Windows you don&#039;t need to install any drivers to communicate with the JrJr, but you&#039;ll need to install some software first&lt;br /&gt;
&lt;br /&gt;
=== Install Vivado Lab Soltions - 2023.2 ===&lt;br /&gt;
Please use the following link to download Vivaldo Lab Solutions&lt;br /&gt;
&lt;br /&gt;
https://www.xilinx.com/member/forms/download/xef.html?filename=Vivado_Lab_Win_2023.2_1013_2256.tar.gz&lt;br /&gt;
&lt;br /&gt;
Make sure you select the recommended version 2023.2, please note that you might need to sign up to AMD&#039;s development tools before you download the tool. Don&#039;t worry it&#039;s free and after signing up and confirming your email you can download the software.&lt;br /&gt;
&lt;br /&gt;
It is recomended that you have your &amp;lt;b&amp;gt;F256 JrJr&amp;lt;/b&amp;gt; disconnected from the computer while you install the software.&lt;br /&gt;
&lt;br /&gt;
=== Program the FPGA from Vivaldo Lab Solutions ===&lt;br /&gt;
* When you enter &amp;quot;Vivado Lab&amp;quot; make sure you click on  The Option &amp;quot;Open Hardware Manager&amp;quot;, this will open a new window.&lt;br /&gt;
* On the new window at the very Top you will see a message &amp;quot;No hardware target is open&amp;quot;&lt;br /&gt;
* Proceed to connect you &amp;lt;b&amp;gt;F256 JrJr&amp;lt;/b&amp;gt; to your computer with an USB to USB3 cable and turn it on, your PC&#039;s USB port should provide enough power to turn on your JrJr and also use the USB cable to program it&lt;br /&gt;
* Click on the &amp;quot;Open Target&amp;quot; link, shown in the message at the top, and select &amp;quot;Auto Connect&amp;quot; from the options shown&lt;br /&gt;
* It will try to connect for a few seconds and it will add the device &amp;quot;xc7a35t_0&amp;quot; to the list of devices&lt;br /&gt;
* Click this device name with the mouse alternate button to open a context menu&lt;br /&gt;
* Select the option &amp;quot;Add Configuration Memory Device&amp;quot;&lt;br /&gt;
* A dialog will open with a lot of information, go to the &amp;quot;Select Configuration memory Part&amp;quot; and in the Search box type &amp;lt;b&amp;gt;mt25ql128-spi-x1_x2_x4&amp;lt;/b&amp;gt; to select the memory chip used in the JrJr&lt;br /&gt;
* CLick on the device name filtered from the list and press &amp;quot;OK&amp;quot;&lt;br /&gt;
* It will ask you if you want to program the device now, you can press Ok to get to the programming right away&lt;br /&gt;
* If for any reason you decided to not the program it yet, you can program it by clicking with the alternate mouse button in the &amp;quot;mt25ql128-spi-x1_x2_x4&amp;quot; device added in the tree list, and selecting from the context menu the option &amp;quot;Program Configuration Memory Device...&amp;quot;&lt;br /&gt;
* A new dialog will appear and you need to select the configuration file, these are the .mcs files published in the f256jr2x-fpga-release section in discord (check link below)&lt;br /&gt;
https://discord.com/channels/691915291721990194/1319458207743082627&lt;br /&gt;
* Select the desired .mcs file from your file system and press OK&lt;br /&gt;
* Keep the &amp;quot;Program Operations&amp;quot; options as are provided by default and press the &amp;quot;OK&amp;quot; button&lt;br /&gt;
* The device will be erased and programmed, this will take about 1 minute&lt;br /&gt;
* A message &amp;quot;Flash programming completed succesfully&amp;quot; will be shown after the device is succesfully finished it&#039;s programming.&lt;br /&gt;
&amp;lt;Br&amp;gt;Congratulations!, your FPGA should be updated now!, you can turn off your &amp;quot;F256 JrJr&amp;quot; and disconnect it from the USB port&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=FPGA_Upgrade_Guide_(F256JrJr)&amp;diff=38152</id>
		<title>FPGA Upgrade Guide (F256JrJr)</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=FPGA_Upgrade_Guide_(F256JrJr)&amp;diff=38152"/>
		<updated>2025-07-06T04:21:06Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Upgrading the FPGA on F256JrJr can be done using the built-in USB Type-C port. Plug JrJr into your computer and turn it on, then follow the steps below that are specific to your operating system.&lt;br /&gt;
&lt;br /&gt;
== Linux and macOS ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;macOS Note:&#039;&#039;&#039; The default USB serial driver on macOS has issues sometimes with the chip used on JrJr. If you encounter any issues upgrading the FPGA firmware, you can try using FTDI&#039;s driver, available here: [https://ftdichip.com/drivers/vcp-drivers]&lt;br /&gt;
&lt;br /&gt;
=== Using openFPGALoader ===&lt;br /&gt;
[https://github.com/trabucayre/openFPGALoader &#039;&#039;&#039;openFPGALoader&#039;&#039;&#039;] is the easiest way to upgrade the firmware on JrJr. The following steps explain how to upgrade the FPGA firmware on JrJr using openFPGALoader.&lt;br /&gt;
# Install openFPGALoader&lt;br /&gt;
#: The &amp;lt;code&amp;gt;openfpgaloader&amp;lt;/code&amp;gt; package is available on several of the most common Linux distros (including Ubuntu, Arch, and Fedora) and is also available on Homebrew for macOS. &lt;br /&gt;
#: If you can&#039;t install it through your package manager, other options for installing openFPGALoader can be found here: [https://trabucayre.github.io/openFPGALoader/guide/install.html]&lt;br /&gt;
# Run openFPGALoader&lt;br /&gt;
#: The following command will upgrade the firmware. Replace &amp;lt;code&amp;gt;&amp;lt;firmware&amp;gt;&amp;lt;/code&amp;gt; with the path to the FPGA firmware file you downloaded.&lt;br /&gt;
#: &amp;lt;code&amp;gt;openFPGALoader -c ft4232 --fpga-part xc7a35tcsg324 -f &amp;lt;firmware&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
In Windows you don&#039;t need to install any drivers to communicate with the JrJr, but you&#039;ll need to install some software first&lt;br /&gt;
&lt;br /&gt;
=== Install Vivado Lab Soltions - 2023.2 ===&lt;br /&gt;
Please use the following link to download Vivaldo Lab Solutions&lt;br /&gt;
&lt;br /&gt;
https://www.xilinx.com/member/forms/download/xef.html?filename=Vivado_Lab_Win_2023.2_1013_2256.tar.gz&lt;br /&gt;
&lt;br /&gt;
Make sure you select the recommended version 2023.2, please note that you might need to sign up to AMD&#039;s development tools before you download the tool. Don&#039;t worry it&#039;s free and after signing up and confirming your email you can download the software.&lt;br /&gt;
&lt;br /&gt;
It is recomended that you have your &amp;lt;b&amp;gt;F256 JrJr&amp;lt;/b&amp;gt; disconnected from the computer while you install the software.&lt;br /&gt;
&lt;br /&gt;
=== Program the FPGA from Vivaldo Lab Solutions ===&lt;br /&gt;
* When you enter &amp;quot;Vivado Lab&amp;quot; make sure you click on  The Option &amp;quot;Open Hardware Manager&amp;quot;, this will open a new window.&lt;br /&gt;
* On the new window at the very Top you will see a message &amp;quot;No hardware target is open&amp;quot;&lt;br /&gt;
* Proceed to connect you &amp;lt;b&amp;gt;F256 JrJr&amp;lt;/b&amp;gt; to your computer with an USB to USB3 cable and turn it on, your PC&#039;s USB port should provide enough power to turn on your JrJr and also use the USB cable to program it&lt;br /&gt;
* Click on the &amp;quot;Open Target&amp;quot; link, shown in the message at the top, and select &amp;quot;Auto Connect&amp;quot; from the options shown&lt;br /&gt;
* It will try to connect for a few seconds and it will add the device &amp;quot;xc7a35t_0&amp;quot; to the list of devices&lt;br /&gt;
* Click this device name with the mouse alternate button to open a context menu&lt;br /&gt;
* Select the option &amp;quot;Add Configuration Memory Device&amp;quot;&lt;br /&gt;
* A dialog will open with a lot of information, go to the &amp;quot;Select Configuration memory Part&amp;quot; and in the Search box type &amp;lt;b&amp;gt;mt25ql128-spi-x1_x2_x4&amp;lt;/b&amp;gt; to select the memory chip used in the JrJr&lt;br /&gt;
* CLick on the device name filtered from the list and press &amp;quot;OK&amp;quot;&lt;br /&gt;
* It will ask you if you want to program the device now, you can press Ok to get to the programming right away&lt;br /&gt;
* If for any reason you decided to not the program it yet, you can program it by clicking with the alternate mouse button in the &amp;quot;mt25ql128-spi-x1_x2_x4&amp;quot; device added in the tree list, and selecting from the context menu the option &amp;quot;Program Configuration Memory Device...&amp;quot;&lt;br /&gt;
* A new dialog will appear and you need to select the configuration file, this is the .mcs file provided in the f256jr2x-fpga-release section in discord (check link below)&lt;br /&gt;
https://discord.com/channels/691915291721990194/1319458207743082627&lt;br /&gt;
* Select the desired .mcs file and press OK&lt;br /&gt;
* Keep the Program Operations as are selected as default and press the &amp;quot;OK&amp;quot; button&lt;br /&gt;
* The device will be erased and programmed, this will take about 1 minute&lt;br /&gt;
* A message &amp;quot;Flash programming completed succesfully&amp;quot; will be shown after the device is succesfully programmed.&lt;br /&gt;
&amp;lt;Br&amp;gt;Congratulations!, your FPGA should be updated now!, you can turn off your &amp;quot;F256 JrJr&amp;quot; and disconnect it from the USB port&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=FPGA_Upgrade_Guide_(F256JrJr)&amp;diff=38151</id>
		<title>FPGA Upgrade Guide (F256JrJr)</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=FPGA_Upgrade_Guide_(F256JrJr)&amp;diff=38151"/>
		<updated>2025-07-06T04:17:16Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Upgrading the FPGA on F256JrJr can be done using the built-in USB Type-C port. Plug JrJr into your computer and turn it on, then follow the steps below that are specific to your operating system.&lt;br /&gt;
&lt;br /&gt;
== Linux and macOS ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;macOS Note:&#039;&#039;&#039; The default USB serial driver on macOS has issues sometimes with the chip used on JrJr. If you encounter any issues upgrading the FPGA firmware, you can try using FTDI&#039;s driver, available here: [https://ftdichip.com/drivers/vcp-drivers]&lt;br /&gt;
&lt;br /&gt;
=== Using openFPGALoader ===&lt;br /&gt;
[https://github.com/trabucayre/openFPGALoader &#039;&#039;&#039;openFPGALoader&#039;&#039;&#039;] is the easiest way to upgrade the firmware on JrJr. The following steps explain how to upgrade the FPGA firmware on JrJr using openFPGALoader.&lt;br /&gt;
# Install openFPGALoader&lt;br /&gt;
#: The &amp;lt;code&amp;gt;openfpgaloader&amp;lt;/code&amp;gt; package is available on several of the most common Linux distros (including Ubuntu, Arch, and Fedora) and is also available on Homebrew for macOS. &lt;br /&gt;
#: If you can&#039;t install it through your package manager, other options for installing openFPGALoader can be found here: [https://trabucayre.github.io/openFPGALoader/guide/install.html]&lt;br /&gt;
# Run openFPGALoader&lt;br /&gt;
#: The following command will upgrade the firmware. Replace &amp;lt;code&amp;gt;&amp;lt;firmware&amp;gt;&amp;lt;/code&amp;gt; with the path to the FPGA firmware file you downloaded.&lt;br /&gt;
#: &amp;lt;code&amp;gt;openFPGALoader -c ft4232 --fpga-part xc7a35tcsg324 -f &amp;lt;firmware&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
In Windows you don&#039;t need to install any drivers to communicate with the JrJr, but you&#039;ll need to install some software first&lt;br /&gt;
&lt;br /&gt;
 # Install Vivado Lab Soltions - 2023.2&lt;br /&gt;
Please use the following link to download Vivaldo Lab Solutions, make sure you select the recommended version 2023.2, please note that you might need to sign up to AMD&#039;s development tools before you download the tool. Don&#039;t worry it&#039;s free and after signing up and confirming your email you can download the software.&lt;br /&gt;
It is recomended that you have your &amp;lt;b&amp;gt;F256 JrJr&amp;lt;/b&amp;gt; disconnected from the computer while you install the software&lt;br /&gt;
&lt;br /&gt;
# How to Program&lt;br /&gt;
* When you enter &amp;quot;Vivado Lab&amp;quot; make sure you click on  The Option &amp;quot;Open Hardware Manager&amp;quot;, this will open a new window.&lt;br /&gt;
* On the new window at the very Top you will see a message &amp;quot;No hardware target is open&amp;quot;&lt;br /&gt;
* Proceed to connect you &amp;lt;b&amp;gt;F256 JrJr&amp;lt;/b&amp;gt; to your computer with an USB to USB3 cable and turn it on, your PC&#039;s USB port should provide enough power to turn on your JrJr and also use the USB cable to program it&lt;br /&gt;
* Click on the &amp;quot;Open Target&amp;quot; link, shown in the message at the top, and select &amp;quot;Auto Connect&amp;quot; from the options shown&lt;br /&gt;
* It will try to connect for a few seconds and it will add the device &amp;quot;xc7a35t_0&amp;quot; to the list of devices&lt;br /&gt;
* Click this device name with the mouse alternate button to open a context menu&lt;br /&gt;
* Select the option &amp;quot;Add Configuration Memory Device&amp;quot;&lt;br /&gt;
* A dialog will open with a lot of information, go to the &amp;quot;Select Configuration memory Part&amp;quot; and in the Search box type &amp;lt;b&amp;gt;mt25ql128-spi-x1_x2_x4&amp;lt;/b&amp;gt; to select the memory chip used in the JrJr&lt;br /&gt;
* CLick on the device name filtered from the list and press &amp;quot;OK&amp;quot;&lt;br /&gt;
* It will ask you if you want to program the device now, you can press Ok to get to the programming right away&lt;br /&gt;
* If for any reason you decided to not the program it yet, you can program it by clicking with the alternate mouse button in the &amp;quot;mt25ql128-spi-x1_x2_x4&amp;quot; device added in the tree list, and selecting from the context menu the option &amp;quot;Program Configuration Memory Device...&amp;quot;&lt;br /&gt;
* A new dialog will appear and you need to select the configuration file, this is the .mcs file provided in the f256jr2x-fpga-release section in discord (check link below)&lt;br /&gt;
https://discord.com/channels/691915291721990194/1319458207743082627&lt;br /&gt;
* Select the desired .mcs file and press OK&lt;br /&gt;
* Keep the Program Operations as are selected as default and press the &amp;quot;OK&amp;quot; button&lt;br /&gt;
* The device will be erased and programmed, this will take about 1 minute&lt;br /&gt;
* A message &amp;quot;Flash programming completed succesfully&amp;quot; will be shown after the device is succesfully programmed.&lt;br /&gt;
&amp;lt;Br&amp;gt;&lt;br /&gt;
Congratulations!, your FPGA should be updated now!, you can turn off your &amp;quot;F256 JrJr&amp;quot; and disconnect it from the USB port&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38093</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38093"/>
		<updated>2025-06-07T02:00:08Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: /* Getting a Directory from BASIC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;    &lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;    &lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;    &lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;    &lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;    &lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is to use this routine to print at a certain X,Y coordinate onscreen. Oh you are not not using an 80 column screen mode?, don&#039;t worry the routine will compensate automagically!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&amp;lt;br&amp;gt;&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&amp;lt;br&amp;gt;&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Square Root =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to calculate the square root of a number, it&#039;s very useful for a few algorithms, be aware that it will only work on numbers below 32768, square root is returned on the variable - &#039;&#039;guess#&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;Newton&#039;s Method of Calculating Square Root&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc sqr(n)&amp;lt;br&amp;gt;&lt;br /&gt;
n#=n:guess#=n#&amp;lt;br&amp;gt;&lt;br /&gt;
while (0.001&amp;lt;abs(guess#*guess#-n#))&amp;lt;br&amp;gt;&lt;br /&gt;
guess#=guess#+n/guess#)/2&amp;lt;br&amp;gt;&lt;br /&gt;
wend&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Loading and Launching another SUPERBASIC program =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say that you want to do a menu or intro in a SUPERBASIC program and then after it plays out or you select something this program loads and executes another SUPERBASIC program!, sounds impossible?, no it&#039;s not, it&#039;s actually easy, we can use the functionality of SUPERBASIC that allows you to create your BASIC program (text file) on your PC and transfer it and execute it in your Foenix computer. (I bet you didn&#039;t know you could do that!).  Use these two lines to load and execute your program, obviously this erases the current program from memory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
memcopy $28000,$8000 poke 0: rem &amp;quot;Clear transfer area for new program&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
a$=&amp;quot;Program.bas&amp;quot;:bload a$,$28000:xgo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Renumbering a Program ====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Mike (mcassera in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a down and dirty basic routine you can use to renumber your program. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
1000 rem &amp;quot;SuperBASIC renum routine&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1010 a=$2000:b=1000:c=10&amp;lt;br&amp;gt;&lt;br /&gt;
1020 while peek(a)&amp;lt;&amp;gt;0&amp;lt;br&amp;gt;&lt;br /&gt;
1030 print peekw(a+1);&amp;quot; --&amp;gt; &amp;quot;;b&amp;lt;br&amp;gt;&lt;br /&gt;
1040 pokew a+1,b&amp;lt;br&amp;gt;&lt;br /&gt;
1050 b=b+c&amp;lt;br&amp;gt;&lt;br /&gt;
1060 a=a+peek(a)&amp;lt;br&amp;gt;&lt;br /&gt;
1070 wend &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;blockquote&amp;gt;&#039;a&#039; is the memory location of the basic line&lt;br /&gt;
&lt;br /&gt;
&#039;b&#039; is the new line number&lt;br /&gt;
&lt;br /&gt;
&#039;c&#039; is the interval between new line numbers&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This little program just goes around and changes the word value that hold line numbers. This does not fix any GOTO or GOSUB statements, you&#039;ll have to update those on your own. (Use at your own risk).&lt;br /&gt;
&lt;br /&gt;
==== Getting a Directory from BASIC ====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Mike (mcassera in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I had written an ML program to work with BASIC to dump the directory into memory so I could then copy the filenames into an array. I&#039;ve pulled it out here for a simple basic program you could use in your program.  I&#039;ve only extracted the names because at the time I didn&#039;t need file sizes. The basic program just prints the directory to the screen but you could modify it to place the names in an array&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The machine language routine can be obtained from the following link:&lt;br /&gt;
https://github.com/mcassera/get_dir/blob/5bb017985793c89455746616493f092ef6a47045/get_dir.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sample BASIC code is here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
10    bload &amp;quot;get_dir.bin&amp;quot;,$7F00&amp;lt;BR&amp;gt;&lt;br /&gt;
15    buffer=$7700:buffloc=$7FBB&amp;lt;BR&amp;gt;&lt;br /&gt;
20    directory(buffer,0,&amp;quot;&amp;quot;)&amp;lt;BR&amp;gt;&lt;br /&gt;
30    for n=buffer to peekw(buffloc)&amp;lt;BR&amp;gt;&lt;br /&gt;
40    cprint chr$(peek(n));&amp;lt;BR&amp;gt;&lt;br /&gt;
50    if peek(n)=0 then print &amp;lt;BR&amp;gt;&lt;br /&gt;
60    next &amp;lt;BR&amp;gt;&lt;br /&gt;
70    print &amp;lt;BR&amp;gt;&lt;br /&gt;
80    end &amp;lt;BR&amp;gt;&lt;br /&gt;
1000  proc directory(loc,len,path$)&amp;lt;BR&amp;gt;&lt;br /&gt;
1010  buffloc=$7FBB&amp;lt;BR&amp;gt;&lt;br /&gt;
1020  pathlength=$7FBD&amp;lt;BR&amp;gt;&lt;br /&gt;
1030  pathloc=$7FBE&amp;lt;BR&amp;gt;&lt;br /&gt;
1040  getdir=$7F00&amp;lt;BR&amp;gt;&lt;br /&gt;
1050  pokew buffloc,loc&amp;lt;BR&amp;gt;&lt;br /&gt;
1060  poke pathlength,len&amp;lt;BR&amp;gt;&lt;br /&gt;
1070  for n=0 to len&amp;lt;BR&amp;gt;&lt;br /&gt;
1080  poke pathloc+n,asc(mid$(path$,n+1,1))&amp;lt;BR&amp;gt;&lt;br /&gt;
1090  next &amp;lt;BR&amp;gt;&lt;br /&gt;
1100  call getdir&amp;lt;BR&amp;gt;&lt;br /&gt;
1120  endproc &amp;lt;BR&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Code Explanation&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The basic program loads the binary and sets aside 2k of ram below BASIC rom for the directory buffer. &lt;br /&gt;
* Line 20 is where you call the directory routine. You send the buffer info (already set), the length of your path (if not reading the main directory) and the path.&lt;br /&gt;
* So if I was reading a directory called &#039;bitmaps&#039; the command would change to :  directory(buffer,7,&amp;quot;bitmaps&amp;quot;) &lt;br /&gt;
* Lines 30 to 60 print the directory from memory. This is where you could read the data into an array. Files are separated with a zero byte hence line 50.&lt;br /&gt;
* The file names are stored in memory $7700 to $7eff. You can change the buffer location by changing the value of buffer in line 15, but 2k of ram will be cleared out after that address. &lt;br /&gt;
* The rest of the variables are (buffloc, pathlength,pathloc,getdir) are used by the ML routine and will break it if changed&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38092</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38092"/>
		<updated>2025-06-07T01:58:09Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: Add read directory snippet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;    &lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;    &lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;    &lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;    &lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;    &lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is to use this routine to print at a certain X,Y coordinate onscreen. Oh you are not not using an 80 column screen mode?, don&#039;t worry the routine will compensate automagically!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&amp;lt;br&amp;gt;&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&amp;lt;br&amp;gt;&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Square Root =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to calculate the square root of a number, it&#039;s very useful for a few algorithms, be aware that it will only work on numbers below 32768, square root is returned on the variable - &#039;&#039;guess#&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;Newton&#039;s Method of Calculating Square Root&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc sqr(n)&amp;lt;br&amp;gt;&lt;br /&gt;
n#=n:guess#=n#&amp;lt;br&amp;gt;&lt;br /&gt;
while (0.001&amp;lt;abs(guess#*guess#-n#))&amp;lt;br&amp;gt;&lt;br /&gt;
guess#=guess#+n/guess#)/2&amp;lt;br&amp;gt;&lt;br /&gt;
wend&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Loading and Launching another SUPERBASIC program =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say that you want to do a menu or intro in a SUPERBASIC program and then after it plays out or you select something this program loads and executes another SUPERBASIC program!, sounds impossible?, no it&#039;s not, it&#039;s actually easy, we can use the functionality of SUPERBASIC that allows you to create your BASIC program (text file) on your PC and transfer it and execute it in your Foenix computer. (I bet you didn&#039;t know you could do that!).  Use these two lines to load and execute your program, obviously this erases the current program from memory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
memcopy $28000,$8000 poke 0: rem &amp;quot;Clear transfer area for new program&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
a$=&amp;quot;Program.bas&amp;quot;:bload a$,$28000:xgo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Renumbering a Program ====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Mike (mcassera in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a down and dirty basic routine you can use to renumber your program. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
1000 rem &amp;quot;SuperBASIC renum routine&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1010 a=$2000:b=1000:c=10&amp;lt;br&amp;gt;&lt;br /&gt;
1020 while peek(a)&amp;lt;&amp;gt;0&amp;lt;br&amp;gt;&lt;br /&gt;
1030 print peekw(a+1);&amp;quot; --&amp;gt; &amp;quot;;b&amp;lt;br&amp;gt;&lt;br /&gt;
1040 pokew a+1,b&amp;lt;br&amp;gt;&lt;br /&gt;
1050 b=b+c&amp;lt;br&amp;gt;&lt;br /&gt;
1060 a=a+peek(a)&amp;lt;br&amp;gt;&lt;br /&gt;
1070 wend &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;blockquote&amp;gt;&#039;a&#039; is the memory location of the basic line&lt;br /&gt;
&lt;br /&gt;
&#039;b&#039; is the new line number&lt;br /&gt;
&lt;br /&gt;
&#039;c&#039; is the interval between new line numbers&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This little program just goes around and changes the word value that hold line numbers. This does not fix any GOTO or GOSUB statements, you&#039;ll have to update those on your own. (Use at your own risk).&lt;br /&gt;
&lt;br /&gt;
==== Getting a Directory from BASIC ====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Mike (mcassera in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I had written an ML program to work with BASIC to dump the directory into memory so I could then copy the filenames into an array. I&#039;ve pulled it out here for a simple basic program you could use in your program.  I&#039;ve only extracted the names because at the time I didn&#039;t need file sizes. The basic program just prints the directory to the screen but you could modify it to place the names in an array&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The machine language routine can be obtained from the following link:&lt;br /&gt;
&lt;br /&gt;
https://github.com/mcassera/get_dir/blob/5bb017985793c89455746616493f092ef6a47045/get_dir.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sample BASIC code is here:&lt;br /&gt;
&lt;br /&gt;
10    bload &amp;quot;get_dir.bin&amp;quot;,$7F00&lt;br /&gt;
&lt;br /&gt;
15    buffer=$7700:buffloc=$7FBB&lt;br /&gt;
&lt;br /&gt;
20    directory(buffer,0,&amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
30    for n=buffer to peekw(buffloc)&lt;br /&gt;
&lt;br /&gt;
40    cprint chr$(peek(n));&lt;br /&gt;
&lt;br /&gt;
50    if peek(n)=0 then print &lt;br /&gt;
&lt;br /&gt;
60    next &lt;br /&gt;
&lt;br /&gt;
70    print &lt;br /&gt;
&lt;br /&gt;
80    end &lt;br /&gt;
&lt;br /&gt;
1000  proc directory(loc,len,path$)&lt;br /&gt;
&lt;br /&gt;
1010  buffloc=$7FBB&lt;br /&gt;
&lt;br /&gt;
1020  pathlength=$7FBD&lt;br /&gt;
&lt;br /&gt;
1030  pathloc=$7FBE&lt;br /&gt;
&lt;br /&gt;
1040  getdir=$7F00&lt;br /&gt;
&lt;br /&gt;
1050  pokew buffloc,loc&lt;br /&gt;
&lt;br /&gt;
1060  poke pathlength,len&lt;br /&gt;
&lt;br /&gt;
1070  for n=0 to len&lt;br /&gt;
&lt;br /&gt;
1080  poke pathloc+n,asc(mid$(path$,n+1,1))&lt;br /&gt;
&lt;br /&gt;
1090  next &lt;br /&gt;
&lt;br /&gt;
1100  call getdir&lt;br /&gt;
&lt;br /&gt;
1120  endproc &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Code Explanation&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The basic program loads the binary and sets aside 2k of ram below BASIC rom for the directory buffer. &lt;br /&gt;
* Line 20 is where you call the directory routine. You send the buffer info (already set), the length of your path (if not reading the main directory) and the path.&lt;br /&gt;
* So if I was reading a directory called &#039;bitmaps&#039; the command would change to :  directory(buffer,7,&amp;quot;bitmaps&amp;quot;) &lt;br /&gt;
* Lines 30 to 60 print the directory from memory. This is where you could read the data into an array. Files are separated with a zero byte hence line 50.&lt;br /&gt;
* The file names are stored in memory $7700 to $7eff. You can change the buffer location by changing the value of buffer in line 15, but 2k of ram will be cleared out after that address. &lt;br /&gt;
* The rest of the variables are (buffloc, pathlength,pathloc,getdir) are used by the ML routine and will break it if changed&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38091</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38091"/>
		<updated>2025-06-07T01:49:16Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;    &lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;    &lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;    &lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;    &lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;    &lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is to use this routine to print at a certain X,Y coordinate onscreen. Oh you are not not using an 80 column screen mode?, don&#039;t worry the routine will compensate automagically!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&amp;lt;br&amp;gt;&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&amp;lt;br&amp;gt;&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Square Root =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to calculate the square root of a number, it&#039;s very useful for a few algorithms, be aware that it will only work on numbers below 32768, square root is returned on the variable - &#039;&#039;guess#&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;Newton&#039;s Method of Calculating Square Root&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc sqr(n)&amp;lt;br&amp;gt;&lt;br /&gt;
n#=n:guess#=n#&amp;lt;br&amp;gt;&lt;br /&gt;
while (0.001&amp;lt;abs(guess#*guess#-n#))&amp;lt;br&amp;gt;&lt;br /&gt;
guess#=guess#+n/guess#)/2&amp;lt;br&amp;gt;&lt;br /&gt;
wend&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Loading and Launching another SUPERBASIC program =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say that you want to do a menu or intro in a SUPERBASIC program and then after it plays out or you select something this program loads and executes another SUPERBASIC program!, sounds impossible?, no it&#039;s not, it&#039;s actually easy, we can use the functionality of SUPERBASIC that allows you to create your BASIC program (text file) on your PC and transfer it and execute it in your Foenix computer. (I bet you didn&#039;t know you could do that!).  Use these two lines to load and execute your program, obviously this erases the current program from memory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
memcopy $28000,$8000 poke 0: rem &amp;quot;Clear transfer area for new program&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
a$=&amp;quot;Program.bas&amp;quot;:bload a$,$28000:xgo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Renumbering a Program ====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Mike (mcassera in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a down and dirty basic routine you can use to renumber your program. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
1000 rem &amp;quot;SuperBASIC renum routine&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1010 a=$2000:b=1000:c=10&amp;lt;br&amp;gt;&lt;br /&gt;
1020 while peek(a)&amp;lt;&amp;gt;0&amp;lt;br&amp;gt;&lt;br /&gt;
1030 print peekw(a+1);&amp;quot; --&amp;gt; &amp;quot;;b&amp;lt;br&amp;gt;&lt;br /&gt;
1040 pokew a+1,b&amp;lt;br&amp;gt;&lt;br /&gt;
1050 b=b+c&amp;lt;br&amp;gt;&lt;br /&gt;
1060 a=a+peek(a)&amp;lt;br&amp;gt;&lt;br /&gt;
1070 wend &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;blockquote&amp;gt;&#039;a&#039; is the memory location of the basic line&lt;br /&gt;
&lt;br /&gt;
&#039;b&#039; is the new line number&lt;br /&gt;
&lt;br /&gt;
&#039;c&#039; is the interval between new line numbers&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This little program just goes around and changes the word value that hold line numbers. This does not fix any GOTO or GOSUB statements, you&#039;ll have to update those on your own. (Use at your own risk).&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38090</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38090"/>
		<updated>2025-06-07T01:44:14Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;    &lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;    &lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;    &lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;    &lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;    &lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is to use this routine to print at a certain X,Y coordinate onscreen. Oh you are not not using an 80 column screen mode?, don&#039;t worry the routine will compensate automagically!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&amp;lt;br&amp;gt;&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&amp;lt;br&amp;gt;&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Square Root =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to calculate the square root of a number, it&#039;s very useful for a few algorithms, be aware that it will only work on numbers below 32768, square root is returned on the variable - &#039;&#039;guess#&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;Newton&#039;s Method of Calculating Square Root&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc sqr(n)&amp;lt;br&amp;gt;&lt;br /&gt;
n#=n:guess#=n#&amp;lt;br&amp;gt;&lt;br /&gt;
while (0.001&amp;lt;abs(guess#*guess#-n#))&amp;lt;br&amp;gt;&lt;br /&gt;
guess#=guess#+n/guess#)/2&amp;lt;br&amp;gt;&lt;br /&gt;
wend&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Loading and Launching another SUPERBASIC program =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say that you want to do a menu or intro in a SUPERBASIC program and then after it plays out or you select something this program loads and executes another SUPERBASIC program!, sounds impossible?, no it&#039;s not, it&#039;s actually easy, we can use the functionality of SUPERBASIC that allows you to create your BASIC program (text file) on your PC and transfer it and execute it in your Foenix computer. (I bet you didn&#039;t know you could do that!).  Use these two lines to load and execute your program, obviously this erases the current program from memory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
memcopy $28000,$8000 poke 0: rem &amp;quot;Clear transfer area for new program&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
a$=&amp;quot;Program.bas&amp;quot;:bload a$,$28000:xgo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Renumbering a Program ====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Mike (mcassera in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a down and dirty basic routine you can use to renumber your program. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
1000 rem &amp;quot;SuperBASIC renum routine&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1010 a=$2000:b=1000:c=10&amp;lt;br&amp;gt;&lt;br /&gt;
1020 while peek(a)&amp;lt;&amp;gt;0&amp;lt;br&amp;gt;&lt;br /&gt;
1030 print peekw(a+1);&amp;quot; --&amp;gt; &amp;quot;;b&amp;lt;br&amp;gt;&lt;br /&gt;
1040 pokew a+1,b&amp;lt;br&amp;gt;&lt;br /&gt;
1050 b=b+c&amp;lt;br&amp;gt;&lt;br /&gt;
1060 a=a+peek(a)&amp;lt;br&amp;gt;&lt;br /&gt;
1070 wend &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;a&#039; is the memory location of the basic line&lt;br /&gt;
&#039;b&#039; is the new line number&lt;br /&gt;
&#039;c&#039; is the interval between new line numbers&lt;br /&gt;
&lt;br /&gt;
This little program just goes around and changes the word value that hold line numbers. This does not fix any GOTO or GOSUB statements, you&#039;ll have to update those on your own. (Use at your own risk).&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38089</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38089"/>
		<updated>2025-06-07T01:42:17Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: Added Renumbering code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;    &lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;    &lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;    &lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;    &lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;    &lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is to use this routine to print at a certain X,Y coordinate onscreen. Oh you are not not using an 80 column screen mode?, don&#039;t worry the routine will compensate automagically!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&amp;lt;br&amp;gt;&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&amp;lt;br&amp;gt;&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Square Root =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to calculate the square root of a number, it&#039;s very useful for a few algorithms, be aware that it will only work on numbers below 32768, square root is returned on the variable - &#039;&#039;guess#&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;Newton&#039;s Method of Calculating Square Root&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc sqr(n)&amp;lt;br&amp;gt;&lt;br /&gt;
n#=n:guess#=n#&amp;lt;br&amp;gt;&lt;br /&gt;
while (0.001&amp;lt;abs(guess#*guess#-n#))&amp;lt;br&amp;gt;&lt;br /&gt;
guess#=guess#+n/guess#)/2&amp;lt;br&amp;gt;&lt;br /&gt;
wend&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Loading and Launching another SUPERBASIC program =====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Ernesto (econtreras in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say that you want to do a menu or intro in a SUPERBASIC program and then after it plays out or you select something this program loads and executes another SUPERBASIC program!, sounds impossible?, no it&#039;s not, it&#039;s actually easy, we can use the functionality of SUPERBASIC that allows you to create your BASIC program (text file) on your PC and transfer it and execute it in your Foenix computer. (I bet you didn&#039;t know you could do that!).  Use these two lines to load and execute your program, obviously this erases the current program from memory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
memcopy $28000,$8000 poke 0: rem &amp;quot;Clear transfer area for new program&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
a$=&amp;quot;Program.bas&amp;quot;:bload a$,$28000:xgo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Renumbering a Program ====&lt;br /&gt;
&amp;lt;small&amp;gt;Contributed by Mike (mcassera in Discord)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a down and dirty basic routine you can use to renumber your program. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1000 rem &amp;quot;SuperBASIC renum routine&amp;quot;&lt;br /&gt;
&lt;br /&gt;
1010 a=$2000:b=1000:c=10&lt;br /&gt;
&lt;br /&gt;
1020 while peek(a)&amp;lt;&amp;gt;0&lt;br /&gt;
&lt;br /&gt;
1030 print peekw(a+1);&amp;quot; --&amp;gt; &amp;quot;;b&lt;br /&gt;
&lt;br /&gt;
1040 pokew a+1,b&lt;br /&gt;
&lt;br /&gt;
1050 b=b+c&lt;br /&gt;
&lt;br /&gt;
1060 a=a+peek(a)&lt;br /&gt;
&lt;br /&gt;
1070 wend &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;a&#039; is the memory location of the basic line&lt;br /&gt;
&lt;br /&gt;
&#039;b&#039; is the new line number&lt;br /&gt;
&lt;br /&gt;
&#039;c&#039; is the interval between new line numbers&lt;br /&gt;
&lt;br /&gt;
This little program just goes around and changes the word value that hold line numbers. This does not fix any goto or gosub statements, you&#039;ll have to update those on your own. (Use at your own risk).&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38073</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38073"/>
		<updated>2025-05-16T04:17:15Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: Added a couple more Snippets - Ernesto Contreras&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;    &lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;    &lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;    &lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;    &lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;    &lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is to use this routine to print at a certain X,Y coordinate onscreen. Oh you are not not using an 80 column screen mode?, don&#039;t worry the routine will compensate automagically!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&amp;lt;br&amp;gt;&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&amp;lt;br&amp;gt;&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Square Root =====&lt;br /&gt;
You might need to calculate the square root of a number, it&#039;s very useful for a few algorithms, be aware that it will only work on numbers below 32768, square root is returned on the variable - &#039;&#039;guess#&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;Newton&#039;s Method of Calculating Square Root&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc sqr(n)&amp;lt;br&amp;gt;&lt;br /&gt;
n#=n:guess#=n#&amp;lt;br&amp;gt;&lt;br /&gt;
while (0.001&amp;lt;abs(guess#*guess#-n#))&amp;lt;br&amp;gt;&lt;br /&gt;
guess#=guess#+n/guess#)/2&amp;lt;br&amp;gt;&lt;br /&gt;
wend&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Loading and Launching another SUPERBASIC program =====&lt;br /&gt;
Let&#039;s say that you want to do a menu or intro in a SUPERBASIC program and then after it plays out or you select something this program loads and executes another SUPERBASIC program!, sounds impossible?, no it&#039;s not, it&#039;s actually easy, we can use the functionality of SUPERBASIC that allows you to create your BASIC program (text file) on your PC and transfer it and execute it in your Foenix computer. (I bet you didn&#039;t know you could do that!).  Use these two lines to load and execute your program, obviously this erases the current program from memory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
memcopy $28000,$8000 poke 0: rem &amp;quot;Clear transfer area for new program&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
a$=&amp;quot;Program.bas&amp;quot;:bload a$,$28000:xgo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38072</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38072"/>
		<updated>2025-05-16T04:15:04Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;    &lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;    &lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;    &lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;    &lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;    &lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is to use this routine to print at a certain X,Y coordinate onscreen. Oh you are not not using an 80 column screen mode?, don&#039;t worry the routine will compensate automagically!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&amp;lt;br&amp;gt;&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&amp;lt;br&amp;gt;&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Square Root =====&lt;br /&gt;
You might need to calculate the square root of a number, it&#039;s very useful for a few algorithms, be aware that it will only work on numbers below 32768, square root is returned on the variable - &#039;&#039;guess#&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;Newton&#039;s Method of Calculating Square Root&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc sqr(n)&amp;lt;br&amp;gt;&lt;br /&gt;
n#=n:guess#=n#&amp;lt;br&amp;gt;&lt;br /&gt;
while (0.001&amp;lt;abs(guess#*guess#-n#))&amp;lt;br&amp;gt;&lt;br /&gt;
guess#=guess#+n/guess#)/2&amp;lt;br&amp;gt;&lt;br /&gt;
wend&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Loading and Launching another SUPERBASIC program =====&lt;br /&gt;
Let&#039;s say that you want to do a menu or intro in a SUPERBASIC program and then after it plays out or you select something this program loads and executes another SUPERBASIC program!, sounds impossible?, no it&#039;s not it&#039;s actually easy, we can use the functionality of SUPERBASIC that allow you to program on your PC and just transfer and execute your program in your Foenix computer. (I bet you didn&#039;t know you could do that!).  Use these two lines to load and execute your program, obviously this erases the current program from memory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
memcopy $28000,$8000 poke 0: rem &amp;quot;Clear transfer area for new program&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
a$=&amp;quot;Program.bas&amp;quot;:bload a$,$28000:xgo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38071</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38071"/>
		<updated>2025-05-16T04:04:00Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;    &lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;    &lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;    &lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;    &lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;    &lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is to use this routine to print at a certain X,Y coordinate onscreen. Oh you are not not using an 80 column screen mode?, don&#039;t worry the routine will compensate automagically!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&amp;lt;br&amp;gt;&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&amp;lt;br&amp;gt;&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Square Root =====&lt;br /&gt;
You might need to calculate the square root of a number, it&#039;s very useful for a few algorithms, be aware that it will only work on numbers below 32768, square root is returned on the variable - &#039;&#039;guess#&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;Newton&#039;s Method of Calculating Square Root&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc sqr(n)&amp;lt;br&amp;gt;&lt;br /&gt;
n#=n:guess#=n#&amp;lt;br&amp;gt;&lt;br /&gt;
while (0.001&amp;lt;abs(guess#*guess#-n#))&amp;lt;br&amp;gt;&lt;br /&gt;
guess#=guess#+n/guess#)/2&amp;lt;br&amp;gt;&lt;br /&gt;
wend&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38070</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38070"/>
		<updated>2025-05-16T03:57:16Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;    &lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;    &lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;    &lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;    &lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;    &lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;    &lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;    &lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;    &lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;    &lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;    &lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is to use this routine to print at a certain X,Y coordinate onscreen. Oh you are not not using an 80 column screen mode?, don&#039;t worry the routine will compensate automagically!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&amp;lt;br&amp;gt;    &lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&amp;lt;br&amp;gt;    &lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&amp;lt;br&amp;gt;    &lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next&amp;lt;br&amp;gt;    &lt;br /&gt;
?1=0&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Square Root =====&lt;br /&gt;
You might need to calculate the square root of a number, it&#039;s very useful for a few algorithms, be aware that it will only work on numbers below 32768, square root is returned on the variable - &#039;&#039;guess#&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;Newton&#039;s Method of Calculating Square Root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
proc sqr(n)&lt;br /&gt;
&lt;br /&gt;
n#=n:guess#=n#&lt;br /&gt;
&lt;br /&gt;
while (0.001&amp;lt;abs(guess#*guess#-n#))&lt;br /&gt;
&lt;br /&gt;
guess#=guess#+n/guess#)/2&lt;br /&gt;
&lt;br /&gt;
wend&lt;br /&gt;
&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38069</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38069"/>
		<updated>2025-05-16T03:35:34Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr&amp;amp;$1fff&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is to use this routine to print at a certain X,Y coordinate onscreen. Oh you are not not using an 80 column screen mode?, don&#039;t worry the routine will compensate automagically!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&amp;lt;br&amp;gt;&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&amp;lt;br&amp;gt;&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38068</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38068"/>
		<updated>2025-05-15T05:37:09Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr%8192&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr%8192&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is to use this routine to print at a certain X,Y coordinate onscreen. Oh you are not not using an 80 column screen mode?, don&#039;t worry the routine will compensate automagically!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&amp;lt;br&amp;gt;&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&amp;lt;br&amp;gt;&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38067</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38067"/>
		<updated>2025-05-15T05:33:22Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr%8192&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr%8192&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is This routine to print at a certain coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next &lt;br /&gt;
?1=0&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38066</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38066"/>
		<updated>2025-05-15T05:32:32Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr%8192&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr%8192&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is This routine to print at a certain coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next &lt;br /&gt;
?1=0&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38065</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38065"/>
		<updated>2025-05-15T05:31:20Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpeek(addr)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr%8192&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
peekvalue=peek($C000+offset)&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
proc xpoke(addr,value)&amp;lt;br&amp;gt;&lt;br /&gt;
local block:block=addr\8192:local prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
local offset:offset=addr%8192&amp;lt;br&amp;gt;&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&amp;lt;br&amp;gt;&lt;br /&gt;
?($C000+offset)=value&amp;lt;br&amp;gt;&lt;br /&gt;
?1=0:?$E=prevblock&amp;lt;br&amp;gt;&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is This routine to print at a certain coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next &lt;br /&gt;
?1=0&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38064</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38064"/>
		<updated>2025-05-15T05:29:52Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
proc xpeek(addr)&lt;br /&gt;
local block:block=addr\8192:local prevblock&lt;br /&gt;
local offset:offset=addr%8192&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&lt;br /&gt;
peekvalue=peek($C000+offset)&lt;br /&gt;
?1=0:?$E=prevblock&lt;br /&gt;
endproc &lt;br /&gt;
&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&lt;br /&gt;
proc xpoke(addr,value)&lt;br /&gt;
local block:block=addr\8192:local prevblock&lt;br /&gt;
local offset:offset=addr%8192&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&lt;br /&gt;
?($C000+offset)=value&lt;br /&gt;
?1=0:?$E=prevblock&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Print Text at X,Y Position =====&lt;br /&gt;
Chances are that you need to print text at a specific position in the screen, SUPERBASIC doesn&#039;t have a LOCATE command, so the best next thing is This routine to print at a certain coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;proc printat(x,y,a$)&lt;br /&gt;
col=(?$D001)&amp;amp;2:if col=0 then col=1&lt;br /&gt;
local pos:pos=x+y*80\col:?1=2:rem &amp;quot;Set I/O to text memory&amp;quot;&lt;br /&gt;
for c=0 to len(a$)-1:?(pos+c+$C000)=asc(mid$(a$,c+1,1)):next &lt;br /&gt;
?1=0&lt;br /&gt;
endproc&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38063</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38063"/>
		<updated>2025-05-15T05:22:33Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
proc xpeek(addr)&lt;br /&gt;
&lt;br /&gt;
local block:block=addr\8192:local prevblock&lt;br /&gt;
&lt;br /&gt;
local offset:offset=addr%8192&lt;br /&gt;
&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&lt;br /&gt;
&lt;br /&gt;
peekvalue=peek($C000+offset)&lt;br /&gt;
&lt;br /&gt;
?1=0:?$E=prevblock&lt;br /&gt;
&lt;br /&gt;
endproc &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
REM &amp;quot;XPOKE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
proc xpoke(addr,value)&lt;br /&gt;
&lt;br /&gt;
local block:block=addr\8192:local prevblock&lt;br /&gt;
&lt;br /&gt;
local offset:offset=addr%8192&lt;br /&gt;
&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&lt;br /&gt;
&lt;br /&gt;
?($C000+offset)=value&lt;br /&gt;
&lt;br /&gt;
?1=0:?$E=prevblock&lt;br /&gt;
&lt;br /&gt;
endproc &amp;lt;/code&amp;gt;&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38062</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38062"/>
		<updated>2025-05-15T05:20:56Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
===== Poking and Peeking Memory in a different Bank =====&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
proc xpeek(addr)&lt;br /&gt;
&lt;br /&gt;
local block:block=addr\8192:local prevblock&lt;br /&gt;
&lt;br /&gt;
local offset:offset=addr%8192&lt;br /&gt;
&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&lt;br /&gt;
&lt;br /&gt;
peekvalue=peek($C000+offset)&lt;br /&gt;
&lt;br /&gt;
?1=0:?$E=prevblock&lt;br /&gt;
&lt;br /&gt;
endproc &amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;REM &amp;quot;XPOKE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
proc xpoke(addr,value)&lt;br /&gt;
&lt;br /&gt;
local block:block=addr\8192:local prevblock&lt;br /&gt;
&lt;br /&gt;
local offset:offset=addr%8192&lt;br /&gt;
&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&lt;br /&gt;
&lt;br /&gt;
?($C000+offset)=value&lt;br /&gt;
&lt;br /&gt;
?1=0:?$E=prevblock&lt;br /&gt;
&lt;br /&gt;
endproc &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38061</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38061"/>
		<updated>2025-05-15T05:09:39Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
# [[Poking and Peeking memory in a different Bank]]&lt;br /&gt;
# Printing Text at a determined Row, Column &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
proc xpeek(addr)&lt;br /&gt;
&lt;br /&gt;
local block:block=addr\8192:local prevblock&lt;br /&gt;
&lt;br /&gt;
local offset:offset=addr%8192&lt;br /&gt;
&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&lt;br /&gt;
&lt;br /&gt;
peekvalue=peek($C000+offset)&lt;br /&gt;
&lt;br /&gt;
?1=0:?$E=prevblock&lt;br /&gt;
&lt;br /&gt;
endproc &amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;REM &amp;quot;XPOKE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
proc xpoke(addr,value)&lt;br /&gt;
&lt;br /&gt;
local block:block=addr\8192:local prevblock&lt;br /&gt;
&lt;br /&gt;
local offset:offset=addr%8192&lt;br /&gt;
&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&lt;br /&gt;
&lt;br /&gt;
?($C000+offset)=value&lt;br /&gt;
&lt;br /&gt;
?1=0:?$E=prevblock&lt;br /&gt;
&lt;br /&gt;
endproc &amp;lt;/blockquote&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38060</id>
		<title>Code Snippets</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Code_Snippets&amp;diff=38060"/>
		<updated>2025-05-15T05:05:03Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: Code Snippets&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Index of SUPERBASIC Code Snippets (Hopefully this will be sorted by Topic when they grow)&lt;br /&gt;
&lt;br /&gt;
# [[Poking and Peeking memory in a different Bank]]&lt;br /&gt;
# Printing Text at a determined Row, Column &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;====== Poking and Peeking memory in a different Bank ======&amp;lt;/ref&amp;gt;&lt;br /&gt;
SUPERBASIC uses a lot of the memory available, so when you want to store data on a different Bank you want to POKE or PEEK outside the normal memory range, to do so you can use the following PROCEDURES. PLease note that these are not by any means a fast way to do it since we reconfigure the memory LUT so that the memory under the registers location ($C000-$DF00) points to the address that we want to poke or peek on the fly, after that we get or set the content of the memory address and restore the segments so that the Kernel does not blow up after returning.  Contrary to what I initially believed it works!.&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
REM &amp;quot;XPEEK - value is stored in peekvalue variable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
proc xpeek(addr)&lt;br /&gt;
&lt;br /&gt;
local block:block=addr\8192:local prevblock&lt;br /&gt;
&lt;br /&gt;
local offset:offset=addr%8192&lt;br /&gt;
&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&lt;br /&gt;
&lt;br /&gt;
peekvalue=peek($C000+offset)&lt;br /&gt;
&lt;br /&gt;
?1=0:?$E=prevblock&lt;br /&gt;
&lt;br /&gt;
endproc &amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;REM &amp;quot;XPOKE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
proc xpoke(addr,value)&lt;br /&gt;
&lt;br /&gt;
local block:block=addr\8192:local prevblock&lt;br /&gt;
&lt;br /&gt;
local offset:offset=addr%8192&lt;br /&gt;
&lt;br /&gt;
?0=179:prevblock=?$E:?$E=block:?1=4&lt;br /&gt;
&lt;br /&gt;
?($C000+offset)=value&lt;br /&gt;
&lt;br /&gt;
?1=0:?$E=prevblock&lt;br /&gt;
&lt;br /&gt;
endproc &amp;lt;/blockquote&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=SuperBASIC&amp;diff=38059</id>
		<title>SuperBASIC</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=SuperBASIC&amp;diff=38059"/>
		<updated>2025-05-15T04:44:49Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SuperBASIC is inspired by BBC BASIC but offers quite a bit more.&lt;br /&gt;
* [https://github.com/FoenixRetro/f256-superbasic/blob/main/reference/source/f256jr_basic_ref.pdf SuperBASIC Reference Manual].&lt;br /&gt;
* [[SuperBASIC Memory Map]]&lt;br /&gt;
* SuperBASIC Mix Bag of [[Code Snippets]]&lt;br /&gt;
* Watch EMWhite&#039;s excellent intro series on YouTube: [https://www.youtube.com/playlist?list=PLeHjTvk7NPiSqGz4REMH-S4hjYpLS2YNR Full Playlist].&lt;br /&gt;
* Read EMWhite&#039;s [https://apps.emwhite.org/shared-files/885/?Foenix-Rising-Issue-18-November-2024.pdf&amp;amp;download=1 Foenix Rising Issue 18] (November 2024) which goes into detail about a few of the gotchas of superbasic.&lt;br /&gt;
&lt;br /&gt;
=== An informal list of tips, &amp;quot;gotchas&amp;quot;: ===&lt;br /&gt;
&lt;br /&gt;
===== IF, THEN, ELSE =====&lt;br /&gt;
&lt;br /&gt;
====== Source of this tip: Ernesto ======&lt;br /&gt;
* A regular &amp;lt;code&amp;gt;if then&amp;lt;/code&amp;gt; condition can&#039;t contain an &amp;lt;code&amp;gt;else&amp;lt;/code&amp;gt; statement, as in this example: &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0 then x=10&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you need to do an  &amp;lt;code&amp;gt;if then else&amp;lt;/code&amp;gt; structure,  you actually have to do an &amp;lt;code&amp;gt;if else endif&amp;lt;/code&amp;gt; structure like in the following example,  skipping the &amp;lt;code&amp;gt;then&amp;lt;/code&amp;gt; statement. &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0&amp;lt;br /&amp;gt;&lt;br /&gt;
20     x=1&amp;lt;br /&amp;gt;&lt;br /&gt;
30     else&amp;lt;br /&amp;gt;&lt;br /&gt;
40     x=2&amp;lt;br /&amp;gt;&lt;br /&gt;
50 endif&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you do it in one line it needs to have some colons added, making it look weird like this: &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0:x=1:else:x=2:endif&amp;lt;/code&amp;gt;&lt;br /&gt;
* if you dare to omit the &amp;lt;code&amp;gt;endif&amp;lt;/code&amp;gt;  thinking that the &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; statement won&#039;t need it, (mmm.., everything is in one line, so no need, right?) -Nope...all hell breaks loose!- &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0:x=1:else:x=2: REM &amp;quot;&amp;lt;-- Error, omited the endif&amp;quot;&amp;lt;/code&amp;gt; &lt;br /&gt;
* be careful not to add an extra  &amp;lt;code&amp;gt;then&amp;lt;/code&amp;gt; statement by mistake to an &amp;lt;code&amp;gt;if else endif&amp;lt;/code&amp;gt; structure, if you do -All hell breaks loose again!!- &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0 then  : rem &amp;quot;&amp;lt;-- Error, THEN is not needed!!!&amp;quot; &amp;lt;br /&amp;gt;&lt;br /&gt;
20     x=1 &amp;lt;br /&amp;gt;&lt;br /&gt;
30     else &amp;lt;br /&amp;gt;&lt;br /&gt;
40     x=2 &amp;lt;br /&amp;gt;&lt;br /&gt;
50 endif&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Debugging hint: If you encounter an error like &amp;quot;open structure&amp;quot; or &amp;quot;endproc without a proc&amp;quot;: do not trust the line number that you are given. The root of the problem is probably in a structure earlier on in the code.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===== Evaluating multiple conditions in IF statements =====&lt;br /&gt;
SUPERBASIC doesn&#039;t have the dedicated keywords AND , OR so you have to use the bitwise operators to evaluate multiple conditions, please consider the following examples:&lt;br /&gt;
&lt;br /&gt;
* AND  &amp;lt;code&amp;gt;if (a=1)&amp;amp;(b=2) then c=1&amp;lt;/code&amp;gt;&lt;br /&gt;
* OR   &amp;lt;code&amp;gt;if (a=1)^(b=2) then c=1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should work as long as you use parenthesis in all evaluated expressions (Since parenthesis makes bitwise operators behave like logical operators).&lt;br /&gt;
&lt;br /&gt;
===== Using procedures =====&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;proc&amp;lt;/code&amp;gt; keyword is only valid if it appears after an &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt; statement.&lt;br /&gt;
* When calling a procedure use the procedure name followed by parenthesis (), even if the procedure has no parameters.&lt;br /&gt;
* Avoid any space between the procedure name and the parenthesis, else it will produce an error.&lt;br /&gt;
&lt;br /&gt;
===== Keyboard shortcuts =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Key combination&lt;br /&gt;
!Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ctrl-c&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;RUN STOP&amp;lt;/code&amp;gt; on the F256K&lt;br /&gt;
|Stops a listing or a running program&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ctrl-l&amp;lt;/code&amp;gt;&lt;br /&gt;
|Clears the screen&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ctrl-a&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;CLR/HOME&amp;lt;/code&amp;gt; on the F256K&lt;br /&gt;
|Move cursor to the first character in the current line&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ctrl-e&amp;lt;/code&amp;gt;&lt;br /&gt;
|Move cursor to the last character in the current line&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ctrl-i&amp;lt;/code&amp;gt;&lt;br /&gt;
|Move cursor 8 characters to the right &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ctrl-k&amp;lt;/code&amp;gt;&lt;br /&gt;
|Deletes characters from cursor position to line end&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Behaviour of load and bload =====&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;bload&amp;lt;/code&amp;gt; statement does not print &amp;lt;code&amp;gt;Completed&amp;lt;/code&amp;gt; when loading is successfull whereas &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; does.&lt;br /&gt;
* bload can load anywhere on memory not just under the first 64k&lt;br /&gt;
* An exception is that bload can&#039;t load I/O parameters that reside in $C000 - $DFFF&lt;br /&gt;
&lt;br /&gt;
===== Control characters for cursor and colour control =====&lt;br /&gt;
In BASIC the following character codes can be used with &amp;lt;code&amp;gt;print&amp;lt;/code&amp;gt; to control the cursor position and colours on the screen.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Code&lt;br /&gt;
!Effect&lt;br /&gt;
|-&lt;br /&gt;
|chr$(1)&lt;br /&gt;
|Set cursor to leftmost position in current line&lt;br /&gt;
|-&lt;br /&gt;
|chr$(2)&lt;br /&gt;
|Cursor left&lt;br /&gt;
|-&lt;br /&gt;
|chr$(5)&lt;br /&gt;
|Set cursor to righmost position in current line&lt;br /&gt;
|-&lt;br /&gt;
|chr$(6)&lt;br /&gt;
|Cursor right&lt;br /&gt;
|-&lt;br /&gt;
|chr$(11)&lt;br /&gt;
|Deletes characters from cursor position to line end&lt;br /&gt;
|-&lt;br /&gt;
|chr$(12)&lt;br /&gt;
|Clear screen and set cursor to upper left corner&lt;br /&gt;
|-&lt;br /&gt;
|chr$(13)&lt;br /&gt;
|Move cursor to start of next line&lt;br /&gt;
|-&lt;br /&gt;
|chr$(14)&lt;br /&gt;
|Cursor down&lt;br /&gt;
|-&lt;br /&gt;
|chr$(16)&lt;br /&gt;
|Cursor up&lt;br /&gt;
|-&lt;br /&gt;
|chr$(128) - chr$(143)&lt;br /&gt;
|Set foreground color. Code 128 is black 143 is white. The rest follows the sequence given below&lt;br /&gt;
|-&lt;br /&gt;
|chr$(144) - chr$(159)&lt;br /&gt;
|Set background color. Code 144 is black 159 is white. The rest follows the sequence given below&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Colour code&lt;br /&gt;
!Colour&lt;br /&gt;
!Colour code&lt;br /&gt;
!Colour&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Black&lt;br /&gt;
|8&lt;br /&gt;
|Dark grey&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Grey&lt;br /&gt;
|9&lt;br /&gt;
|Light grey (default foreground)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Dark blue (default background colour)&lt;br /&gt;
|10&lt;br /&gt;
|Blue&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Green&lt;br /&gt;
|11&lt;br /&gt;
|Light green&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Purple&lt;br /&gt;
|12&lt;br /&gt;
|Light purple&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Brown&lt;br /&gt;
|13&lt;br /&gt;
|Red&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Orange&lt;br /&gt;
|14&lt;br /&gt;
|Yellow&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Light blue&lt;br /&gt;
|15&lt;br /&gt;
|White&lt;br /&gt;
|}The background colors do not work when the bitmap layer has been turned on. They will also not work if you have returned from the bitmap layer with a &amp;lt;code&amp;gt;bitmap off&amp;lt;/code&amp;gt; command. In order to restore the background control character function you will need to make sure the MMU is set to zero by using &amp;lt;code&amp;gt;POKE 1,0&amp;lt;/code&amp;gt; and then setting the text mode again by using &amp;lt;code&amp;gt;POKE $d000,1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Character Set / Text matrix ====&lt;br /&gt;
* Access to the full character set can be obtained by using the &amp;lt;code&amp;gt;CPRINT&amp;lt;/code&amp;gt; command instead of the normal &amp;lt;code&amp;gt;PRINT&amp;lt;/code&amp;gt; command.&lt;br /&gt;
* Characters can also be set on the screen text matrix using the &amp;lt;code&amp;gt;POKE&amp;lt;/code&amp;gt; command starting at &amp;lt;code&amp;gt;$C000&amp;lt;/code&amp;gt; providing the MMU I/O control is set to 2 by executing a &amp;lt;code&amp;gt;POKE 1,2&amp;lt;/code&amp;gt; command first (remember to restore the MMU I/O once you&#039;re done).&lt;br /&gt;
[[File:Full char set.png|thumb|104x104px|F256 Character Set|none]]&lt;br /&gt;
* Color can also be set on the screen color matrix using the &amp;lt;code&amp;gt;POKE&amp;lt;/code&amp;gt; command starting at &amp;lt;code&amp;gt;$C000&amp;lt;/code&amp;gt; providing the MMU I/O control is set to 3 by executing a &amp;lt;code&amp;gt;POKE 1,3&amp;lt;/code&amp;gt; command first (remember to restore the MMU I/O once you&#039;re done).&lt;br /&gt;
* When poking colors on the screen, the high nibble is the character color and  the low nibble is the background color.&lt;br /&gt;
&lt;br /&gt;
[[File:Colormatrix.png|alt=Default Colors|thumb|100x100px|Default Colors|none]]&lt;br /&gt;
&lt;br /&gt;
===== Memcopy lockup =====&lt;br /&gt;
&lt;br /&gt;
* In certain situations the &amp;lt;code&amp;gt;&amp;lt;big&amp;gt;memcopy&amp;lt;/big&amp;gt;&amp;lt;/code&amp;gt; command can lockup.&lt;br /&gt;
* A machine language utility that performs the same function as &amp;lt;code&amp;gt;memcopy&amp;lt;/code&amp;gt; is available if &amp;lt;code&amp;gt;memcopy&amp;lt;/code&amp;gt; fails.&lt;br /&gt;
* &amp;lt;u&amp;gt;mlcopy&amp;lt;/u&amp;gt; is a short routine that replaces &amp;lt;code&amp;gt;memcopy&amp;lt;/code&amp;gt; and is more reliable. It can be loaded into memory with a BLOAD command in your program, or with a basic loader that can be added to your program.&lt;br /&gt;
* In place of the &amp;lt;code&amp;gt;memcopy&amp;lt;/code&amp;gt; command you would use 3 &amp;lt;code&amp;gt;&amp;lt;big&amp;gt;POKEL&amp;lt;/big&amp;gt;&amp;lt;/code&amp;gt; commands and a &amp;lt;code&amp;gt;&amp;lt;big&amp;gt;CALL&amp;lt;/big&amp;gt;&amp;lt;/code&amp;gt; command to engage the DMA engine.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;POKEL $0903,data source&amp;lt;/code&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;POKEL $0906,destination&amp;lt;/code&amp;gt; &lt;br /&gt;
 &amp;lt;code&amp;gt;POKEL $0909,number of bytes to copy&amp;lt;/code&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;CALL $0900&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/mcassera/F256-mlcopy mlcopy github page]&lt;br /&gt;
&lt;br /&gt;
===== Sprite Images =====&lt;br /&gt;
&lt;br /&gt;
In BASIC you can access different SPRITE shapes through the IMAGE command as part of the sprite command: &amp;lt;code&amp;gt;SPRITE 0 IMAGE 1 TO 100,100&amp;lt;/code&amp;gt;. Be aware that BASIC can only keep track of 64 Images, if you want to access and show more than 64 different shapes you need to poke the 3 bytes of the address where the image data resides into the correct sprite registers yourself.&lt;br /&gt;
&lt;br /&gt;
===== Sprite Coordinates =====&lt;br /&gt;
In BASIC all sprites are centered on the coordinate specified, this might produce some counterintuitive effects when using different size sprites, for example if you want to align the sprite edge with the top left side of the screen you would need different values depending on the sprite size&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SPRITE 0 IMAGE 1 TO 4,4: REM &amp;quot;8x8 Sprite&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;/BR&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;SPRITE 1 IMAGE 1 TO 8,8: REM &amp;quot;16x16 Sprite&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;/BR&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;SPRITE 2 IMAGE 2 TO 12,12: REM &amp;quot;24x24 Sprite&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;/BR&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;SPRITE 3 IMAGE 3 TO 16,16: REM &amp;quot;32x32 Sprite&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;/BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, please note that you need to use the command &amp;lt;code&amp;gt;SPRITE X IMAGE Y&amp;lt;/code&amp;gt; before setting the sprite coordinates or else BASIC will not know what size is the sprite, and will misalign it, for example the following code although it seems correct will misalign the sprite:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SPRITE 1 TO 8,8&amp;lt;/code&amp;gt;&amp;lt;/BR&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;SPRITE 1 IMAGE 1: REM &amp;quot;USe a 16x16 Sprite&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;/BR&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=SuperBASIC&amp;diff=38058</id>
		<title>SuperBASIC</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=SuperBASIC&amp;diff=38058"/>
		<updated>2025-05-15T04:43:04Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: Added a Code Snippets reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SuperBASIC is inspired by BBC BASIC but offers quite a bit more.&lt;br /&gt;
* [https://github.com/FoenixRetro/f256-superbasic/blob/main/reference/source/f256jr_basic_ref.pdf SuperBASIC Reference Manual].&lt;br /&gt;
* [[SuperBASIC Memory Map]]&lt;br /&gt;
* SuperBASIC Mix Bag of Code Snippets&lt;br /&gt;
* Watch EMWhite&#039;s excellent intro series on YouTube: [https://www.youtube.com/playlist?list=PLeHjTvk7NPiSqGz4REMH-S4hjYpLS2YNR Full Playlist].&lt;br /&gt;
* Read EMWhite&#039;s [https://apps.emwhite.org/shared-files/885/?Foenix-Rising-Issue-18-November-2024.pdf&amp;amp;download=1 Foenix Rising Issue 18] (November 2024) which goes into detail about a few of the gotchas of superbasic.&lt;br /&gt;
&lt;br /&gt;
=== An informal list of tips, &amp;quot;gotchas&amp;quot;: ===&lt;br /&gt;
&lt;br /&gt;
===== IF, THEN, ELSE =====&lt;br /&gt;
&lt;br /&gt;
====== Source of this tip: Ernesto ======&lt;br /&gt;
* A regular &amp;lt;code&amp;gt;if then&amp;lt;/code&amp;gt; condition can&#039;t contain an &amp;lt;code&amp;gt;else&amp;lt;/code&amp;gt; statement, as in this example: &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0 then x=10&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you need to do an  &amp;lt;code&amp;gt;if then else&amp;lt;/code&amp;gt; structure,  you actually have to do an &amp;lt;code&amp;gt;if else endif&amp;lt;/code&amp;gt; structure like in the following example,  skipping the &amp;lt;code&amp;gt;then&amp;lt;/code&amp;gt; statement. &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0&amp;lt;br /&amp;gt;&lt;br /&gt;
20     x=1&amp;lt;br /&amp;gt;&lt;br /&gt;
30     else&amp;lt;br /&amp;gt;&lt;br /&gt;
40     x=2&amp;lt;br /&amp;gt;&lt;br /&gt;
50 endif&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you do it in one line it needs to have some colons added, making it look weird like this: &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0:x=1:else:x=2:endif&amp;lt;/code&amp;gt;&lt;br /&gt;
* if you dare to omit the &amp;lt;code&amp;gt;endif&amp;lt;/code&amp;gt;  thinking that the &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; statement won&#039;t need it, (mmm.., everything is in one line, so no need, right?) -Nope...all hell breaks loose!- &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0:x=1:else:x=2: REM &amp;quot;&amp;lt;-- Error, omited the endif&amp;quot;&amp;lt;/code&amp;gt; &lt;br /&gt;
* be careful not to add an extra  &amp;lt;code&amp;gt;then&amp;lt;/code&amp;gt; statement by mistake to an &amp;lt;code&amp;gt;if else endif&amp;lt;/code&amp;gt; structure, if you do -All hell breaks loose again!!- &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0 then  : rem &amp;quot;&amp;lt;-- Error, THEN is not needed!!!&amp;quot; &amp;lt;br /&amp;gt;&lt;br /&gt;
20     x=1 &amp;lt;br /&amp;gt;&lt;br /&gt;
30     else &amp;lt;br /&amp;gt;&lt;br /&gt;
40     x=2 &amp;lt;br /&amp;gt;&lt;br /&gt;
50 endif&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Debugging hint: If you encounter an error like &amp;quot;open structure&amp;quot; or &amp;quot;endproc without a proc&amp;quot;: do not trust the line number that you are given. The root of the problem is probably in a structure earlier on in the code.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===== Evaluating multiple conditions in IF statements =====&lt;br /&gt;
SUPERBASIC doesn&#039;t have the dedicated keywords AND , OR so you have to use the bitwise operators to evaluate multiple conditions, please consider the following examples:&lt;br /&gt;
&lt;br /&gt;
* AND  &amp;lt;code&amp;gt;if (a=1)&amp;amp;(b=2) then c=1&amp;lt;/code&amp;gt;&lt;br /&gt;
* OR   &amp;lt;code&amp;gt;if (a=1)^(b=2) then c=1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should work as long as you use parenthesis in all evaluated expressions (Since parenthesis makes bitwise operators behave like logical operators).&lt;br /&gt;
&lt;br /&gt;
===== Using procedures =====&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;proc&amp;lt;/code&amp;gt; keyword is only valid if it appears after an &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt; statement.&lt;br /&gt;
* When calling a procedure use the procedure name followed by parenthesis (), even if the procedure has no parameters.&lt;br /&gt;
* Avoid any space between the procedure name and the parenthesis, else it will produce an error.&lt;br /&gt;
&lt;br /&gt;
===== Keyboard shortcuts =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Key combination&lt;br /&gt;
!Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ctrl-c&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;RUN STOP&amp;lt;/code&amp;gt; on the F256K&lt;br /&gt;
|Stops a listing or a running program&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ctrl-l&amp;lt;/code&amp;gt;&lt;br /&gt;
|Clears the screen&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ctrl-a&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;CLR/HOME&amp;lt;/code&amp;gt; on the F256K&lt;br /&gt;
|Move cursor to the first character in the current line&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ctrl-e&amp;lt;/code&amp;gt;&lt;br /&gt;
|Move cursor to the last character in the current line&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ctrl-i&amp;lt;/code&amp;gt;&lt;br /&gt;
|Move cursor 8 characters to the right &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ctrl-k&amp;lt;/code&amp;gt;&lt;br /&gt;
|Deletes characters from cursor position to line end&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Behaviour of load and bload =====&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;bload&amp;lt;/code&amp;gt; statement does not print &amp;lt;code&amp;gt;Completed&amp;lt;/code&amp;gt; when loading is successfull whereas &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; does.&lt;br /&gt;
* bload can load anywhere on memory not just under the first 64k&lt;br /&gt;
* An exception is that bload can&#039;t load I/O parameters that reside in $C000 - $DFFF&lt;br /&gt;
&lt;br /&gt;
===== Control characters for cursor and colour control =====&lt;br /&gt;
In BASIC the following character codes can be used with &amp;lt;code&amp;gt;print&amp;lt;/code&amp;gt; to control the cursor position and colours on the screen.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Code&lt;br /&gt;
!Effect&lt;br /&gt;
|-&lt;br /&gt;
|chr$(1)&lt;br /&gt;
|Set cursor to leftmost position in current line&lt;br /&gt;
|-&lt;br /&gt;
|chr$(2)&lt;br /&gt;
|Cursor left&lt;br /&gt;
|-&lt;br /&gt;
|chr$(5)&lt;br /&gt;
|Set cursor to righmost position in current line&lt;br /&gt;
|-&lt;br /&gt;
|chr$(6)&lt;br /&gt;
|Cursor right&lt;br /&gt;
|-&lt;br /&gt;
|chr$(11)&lt;br /&gt;
|Deletes characters from cursor position to line end&lt;br /&gt;
|-&lt;br /&gt;
|chr$(12)&lt;br /&gt;
|Clear screen and set cursor to upper left corner&lt;br /&gt;
|-&lt;br /&gt;
|chr$(13)&lt;br /&gt;
|Move cursor to start of next line&lt;br /&gt;
|-&lt;br /&gt;
|chr$(14)&lt;br /&gt;
|Cursor down&lt;br /&gt;
|-&lt;br /&gt;
|chr$(16)&lt;br /&gt;
|Cursor up&lt;br /&gt;
|-&lt;br /&gt;
|chr$(128) - chr$(143)&lt;br /&gt;
|Set foreground color. Code 128 is black 143 is white. The rest follows the sequence given below&lt;br /&gt;
|-&lt;br /&gt;
|chr$(144) - chr$(159)&lt;br /&gt;
|Set background color. Code 144 is black 159 is white. The rest follows the sequence given below&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Colour code&lt;br /&gt;
!Colour&lt;br /&gt;
!Colour code&lt;br /&gt;
!Colour&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Black&lt;br /&gt;
|8&lt;br /&gt;
|Dark grey&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Grey&lt;br /&gt;
|9&lt;br /&gt;
|Light grey (default foreground)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Dark blue (default background colour)&lt;br /&gt;
|10&lt;br /&gt;
|Blue&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Green&lt;br /&gt;
|11&lt;br /&gt;
|Light green&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Purple&lt;br /&gt;
|12&lt;br /&gt;
|Light purple&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Brown&lt;br /&gt;
|13&lt;br /&gt;
|Red&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Orange&lt;br /&gt;
|14&lt;br /&gt;
|Yellow&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Light blue&lt;br /&gt;
|15&lt;br /&gt;
|White&lt;br /&gt;
|}The background colors do not work when the bitmap layer has been turned on. They will also not work if you have returned from the bitmap layer with a &amp;lt;code&amp;gt;bitmap off&amp;lt;/code&amp;gt; command. In order to restore the background control character function you will need to make sure the MMU is set to zero by using &amp;lt;code&amp;gt;POKE 1,0&amp;lt;/code&amp;gt; and then setting the text mode again by using &amp;lt;code&amp;gt;POKE $d000,1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Character Set / Text matrix ====&lt;br /&gt;
* Access to the full character set can be obtained by using the &amp;lt;code&amp;gt;CPRINT&amp;lt;/code&amp;gt; command instead of the normal &amp;lt;code&amp;gt;PRINT&amp;lt;/code&amp;gt; command.&lt;br /&gt;
* Characters can also be set on the screen text matrix using the &amp;lt;code&amp;gt;POKE&amp;lt;/code&amp;gt; command starting at &amp;lt;code&amp;gt;$C000&amp;lt;/code&amp;gt; providing the MMU I/O control is set to 2 by executing a &amp;lt;code&amp;gt;POKE 1,2&amp;lt;/code&amp;gt; command first (remember to restore the MMU I/O once you&#039;re done).&lt;br /&gt;
[[File:Full char set.png|thumb|104x104px|F256 Character Set|none]]&lt;br /&gt;
* Color can also be set on the screen color matrix using the &amp;lt;code&amp;gt;POKE&amp;lt;/code&amp;gt; command starting at &amp;lt;code&amp;gt;$C000&amp;lt;/code&amp;gt; providing the MMU I/O control is set to 3 by executing a &amp;lt;code&amp;gt;POKE 1,3&amp;lt;/code&amp;gt; command first (remember to restore the MMU I/O once you&#039;re done).&lt;br /&gt;
* When poking colors on the screen, the high nibble is the character color and  the low nibble is the background color.&lt;br /&gt;
&lt;br /&gt;
[[File:Colormatrix.png|alt=Default Colors|thumb|100x100px|Default Colors|none]]&lt;br /&gt;
&lt;br /&gt;
===== Memcopy lockup =====&lt;br /&gt;
&lt;br /&gt;
* In certain situations the &amp;lt;code&amp;gt;&amp;lt;big&amp;gt;memcopy&amp;lt;/big&amp;gt;&amp;lt;/code&amp;gt; command can lockup.&lt;br /&gt;
* A machine language utility that performs the same function as &amp;lt;code&amp;gt;memcopy&amp;lt;/code&amp;gt; is available if &amp;lt;code&amp;gt;memcopy&amp;lt;/code&amp;gt; fails.&lt;br /&gt;
* &amp;lt;u&amp;gt;mlcopy&amp;lt;/u&amp;gt; is a short routine that replaces &amp;lt;code&amp;gt;memcopy&amp;lt;/code&amp;gt; and is more reliable. It can be loaded into memory with a BLOAD command in your program, or with a basic loader that can be added to your program.&lt;br /&gt;
* In place of the &amp;lt;code&amp;gt;memcopy&amp;lt;/code&amp;gt; command you would use 3 &amp;lt;code&amp;gt;&amp;lt;big&amp;gt;POKEL&amp;lt;/big&amp;gt;&amp;lt;/code&amp;gt; commands and a &amp;lt;code&amp;gt;&amp;lt;big&amp;gt;CALL&amp;lt;/big&amp;gt;&amp;lt;/code&amp;gt; command to engage the DMA engine.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;POKEL $0903,data source&amp;lt;/code&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;POKEL $0906,destination&amp;lt;/code&amp;gt; &lt;br /&gt;
 &amp;lt;code&amp;gt;POKEL $0909,number of bytes to copy&amp;lt;/code&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;CALL $0900&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/mcassera/F256-mlcopy mlcopy github page]&lt;br /&gt;
&lt;br /&gt;
===== Sprite Images =====&lt;br /&gt;
&lt;br /&gt;
In BASIC you can access different SPRITE shapes through the IMAGE command as part of the sprite command: &amp;lt;code&amp;gt;SPRITE 0 IMAGE 1 TO 100,100&amp;lt;/code&amp;gt;. Be aware that BASIC can only keep track of 64 Images, if you want to access and show more than 64 different shapes you need to poke the 3 bytes of the address where the image data resides into the correct sprite registers yourself.&lt;br /&gt;
&lt;br /&gt;
===== Sprite Coordinates =====&lt;br /&gt;
In BASIC all sprites are centered on the coordinate specified, this might produce some counterintuitive effects when using different size sprites, for example if you want to align the sprite edge with the top left side of the screen you would need different values depending on the sprite size&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SPRITE 0 IMAGE 1 TO 4,4: REM &amp;quot;8x8 Sprite&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;/BR&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;SPRITE 1 IMAGE 1 TO 8,8: REM &amp;quot;16x16 Sprite&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;/BR&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;SPRITE 2 IMAGE 2 TO 12,12: REM &amp;quot;24x24 Sprite&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;/BR&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;SPRITE 3 IMAGE 3 TO 16,16: REM &amp;quot;32x32 Sprite&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;/BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, please note that you need to use the command &amp;lt;code&amp;gt;SPRITE X IMAGE Y&amp;lt;/code&amp;gt; before setting the sprite coordinates or else BASIC will not know what size is the sprite, and will misalign it, for example the following code although it seems correct will misalign the sprite:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SPRITE 1 TO 8,8&amp;lt;/code&amp;gt;&amp;lt;/BR&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;SPRITE 1 IMAGE 1: REM &amp;quot;USe a 16x16 Sprite&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;/BR&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Getting_Started&amp;diff=201</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Getting_Started&amp;diff=201"/>
		<updated>2024-01-14T20:56:15Z</updated>

		<summary type="html">&lt;p&gt;Eacontrerasd: /* Native Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting Powered Up ==&lt;br /&gt;
&lt;br /&gt;
=== Powering your F256K ===&lt;br /&gt;
&lt;br /&gt;
The F256K is powered via a standard 2.5mm DC Connector, which takes a centre-positive 12V 2A capable Power Supply.&lt;br /&gt;
&lt;br /&gt;
This type of power supply is quite common.  [https://www.amazon.com/Adapter-100-240V-Transformer-Charger-Security/dp/B091XSVV1Y Example 12V 2A capable power supply] (#)&lt;br /&gt;
&lt;br /&gt;
(#) &#039;&#039;This specific power supply has not been verified (by the author) for use with the F256K.  Please update this page with verified options!&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Powering your F256Jr ===&lt;br /&gt;
&lt;br /&gt;
The F256Jr is supplied as a Mini-ITX form factor mainboard, with a standard 24 pin ATX power supply connector for power connectivity.&lt;br /&gt;
&lt;br /&gt;
Since the F256Jr needs relatively little power, compared to a mini-ATX PC, a popular DC 12V 24pin Pico ATX PSU works well and is a compact solution.&lt;br /&gt;
&lt;br /&gt;
* [https://www.amazon.com/dp/B08F57GKCL Pico PSU] - You power the Pico PSU via a 12V DC center-positive Power Supply source.&lt;br /&gt;
* [https://www.amazon.com/dp/B07MXXXBV8 12V DC center-positive A/C Adapter] - Commonly used to power the Pico PSU.&lt;br /&gt;
&lt;br /&gt;
== Getting programs onto the F256 ==&lt;br /&gt;
&lt;br /&gt;
=== SD Card === &lt;br /&gt;
&lt;br /&gt;
Both the F256K and F256JR have an SD card slot.  The device software to read the SD card is a bit touchy (it&#039;s inherited from the Commander X16 project) and doesn&#039;t work with all SD cards&lt;br /&gt;
&lt;br /&gt;
* Cards should support the V2 protocol (HC or XC); older cards that only support the V1 protocol (typically 2GB or less) won&#039;t work. By contrast, the kernels for the C256 machines generally only work with V1 cards.  Note that, in both cases, this is a software limitation -- all of the Foenix machines are electrically capable of using both kinds of cards.&lt;br /&gt;
* Cards *MUST* be formatted FAT32 -- **NOT: FAT, FAT12, FAT16, or exFAT**.   Note that while MacOS will read a FAT32 formatted card, the included disk utility won&#039;t format FAT32.  Windows 10/11 works fine, but make sure to force FAT32 (or use the command line: &amp;lt;code&amp;gt;format /FS:FAT32 H:&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Some folks have had luck formatting cards with the [https://www.sdcard.org/downloads/formatter/sd-memory-card-formatter-for-windows-download/ Official SD Association formatter for Windows].&lt;br /&gt;
&lt;br /&gt;
=== Demos Archive ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/FoenixRetro/Documentation/blob/main/f256/archive Download the most recent demos archive] and expand it to the root of the flash card.&lt;br /&gt;
&lt;br /&gt;
=== Debug USB port ===&lt;br /&gt;
&lt;br /&gt;
* This is what most developers use as it&#039;s the most convenient.  Connect the debug USB port to your PC or Mac&lt;br /&gt;
&lt;br /&gt;
* You can use:&lt;br /&gt;
** [https://github.com/pweingar/FoenixMgr FoenixMgr] - works on Windows, Mac, Linux&lt;br /&gt;
*** A Python script to manage the Foenix series of retro style computers through their USB debug ports. This tool allows uploading files of various formats to system RAM, and displaying memory through various means.&lt;br /&gt;
&lt;br /&gt;
** [https://github.com/Trinity-11/FoenixIDE FoenixIDE] (Windows only)&lt;br /&gt;
*** Development and Debugging Suite for the C256 Foenix Family of Computers.&lt;br /&gt;
&lt;br /&gt;
=== wget ===&lt;br /&gt;
If you have the [[wifi]] configured, you can use [https://github.com/ghackwrench/F256_wget wget] to pull programs and data right off the web!&lt;br /&gt;
&lt;br /&gt;
== SuperBASIC ==&lt;br /&gt;
&lt;br /&gt;
The machine boots to SuperBASIC.  SuperBASIC is inspired by BBC BASIC but offers quite a bit more.&lt;br /&gt;
&lt;br /&gt;
* Read the [https://github.com/FoenixRetro/f256-superbasic/blob/main/reference/source/f256jr_basic_ref.pdf SuperBASIC Reference Manual].&lt;br /&gt;
&lt;br /&gt;
* Watch EMWhite&#039;s excellent intro series on Youtube:&lt;br /&gt;
** Full Playlist here: [https://www.youtube.com/playlist?list=PLeHjTvk7NPiSqGz4REMH-S4hjYpLS2YNR EMWhite&#039;s Intro Series - Full Playlist].&lt;br /&gt;
** Part 1 can be viewed here:&lt;br /&gt;
&amp;lt;youtube&amp;gt;G_S2c_MsqYA&amp;lt;/youtube&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started, you can type in a sample program at the command prompt:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
10 for i=1 to 5&lt;br /&gt;
20 print &amp;quot;Hello world&amp;quot;&lt;br /&gt;
30 next&lt;br /&gt;
run&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SuperBASIC is similar to CBM (Microsoft) BASIC but has some differences.  For example, note in the sample above it&#039;s just &amp;lt;code&amp;gt;next&amp;lt;/code&amp;gt; not &amp;lt;code&amp;gt;next i&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first 15 or so pages of the [https://github.com/FoenixRetro/f256-superbasic/blob/main/reference/source/f256jr_basic_ref.pdf SuperBASIC Reference Manual] are quite instructive.  &lt;br /&gt;
&lt;br /&gt;
SuperBASIC is actually much more powerful and supports structured programming (procedures, blocks etc.) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dir&amp;lt;/code&amp;gt; - Run this to display directory of SD card&lt;br /&gt;
&lt;br /&gt;
Loading &amp;amp; running programs off of the SD card is similarly easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
load &amp;quot;JrWordl.bas&amp;quot;&lt;br /&gt;
run&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar to the C64, you can save time in loading programs from the &amp;lt;code&amp;gt;dir&amp;lt;/code&amp;gt; listing by using your cursor keys to go up to the entry, typing &amp;lt;code&amp;gt;load &amp;quot;&amp;lt;/code&amp;gt; (insert mode is active by default) etc.  You can use &amp;lt;code&amp;gt;CTRL+E&amp;lt;/code&amp;gt; to jump to the end of the line and use &amp;lt;code&amp;gt;CTRL+K&amp;lt;/code&amp;gt; to delete any text from the cursor to the end of the line.  Correctly place the closing &amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt; and hit &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CTRL+C&amp;lt;/code&amp;gt; acts as a &amp;quot;break&amp;quot; command and stops any running SuperBASIC program or &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Read built-in help/reference:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/help&amp;lt;/code&amp;gt; : But &#039;&#039;&#039;NOTE&#039;&#039;&#039;, this erases BASIC memory!  Use Backspace key to go back in menus and to exit.&lt;br /&gt;
&lt;br /&gt;
Explore the included demo SuperBASIC programs:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Program !! Notes !! Source&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;code&amp;gt;JrWordl.bas&amp;lt;/code&amp;gt; || Wordle game, guess 5 letter word ||&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;code&amp;gt;mandel.bas&amp;lt;/code&amp;gt; || Draws Mandlebrot set in graphics mode, takes between 2 and 3 hours || [https://github.com/Mu0n/F256KbasicBASICdoodles @Mu0n]&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;code&amp;gt;rpg-demo.bas&amp;lt;/code&amp;gt; || UI sample that shows Zelda like RPG game.  Control the character with an Atari-joystick connected to JoyPort1 || @econtrerasd&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;code&amp;gt;Problematic_Code.bas&amp;lt;/code&amp;gt; || Displays scrolling starfield ||&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;code&amp;gt;noelrl.bas&amp;lt;/code&amp;gt; || Simple integer BASIC bench mark from Noel&#039;s retro lab.  Completes &amp;lt; 3.5 seconds, compares very favourably to other retro systems! || [https://www.youtube.com/watch?v=H05hM_Guoqk Youtube]&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;code&amp;gt;dance.bas&amp;lt;/code&amp;gt; || Animates sprite of dancer || [https://github.com/Mu0n/F256KbasicBASICdoodles @Mu0n]&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;code&amp;gt;luna.bas&amp;lt;/code&amp;gt; || Displays simple scene ||&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;code&amp;gt;blink.bas&amp;lt;/code&amp;gt; || Blinks drive access light || [https://github.com/Mu0n/F256KbasicBASICdoodles @Mu0n]&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;code&amp;gt;piano.bas&amp;lt;/code&amp;gt; || Play some notes with the PSG || [https://github.com/Mu0n/F256KbasicBASICdoodles @Mu0n]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Memory Map under BASIC ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|+ Caption text&lt;br /&gt;
|-&lt;br /&gt;
! Initial Address !! End Address !! Description !! Bytes&lt;br /&gt;
|-&lt;br /&gt;
| $0000|| -|| MMU Control Register || 1&lt;br /&gt;
|-&lt;br /&gt;
| $0001|| -|| I/O Control Register || 1&lt;br /&gt;
|-&lt;br /&gt;
| $0002|| $0007|| Free Zero Page Addresses || 6&lt;br /&gt;
|-&lt;br /&gt;
| $0008|| $000F|| MMU Control Addresses || 8&lt;br /&gt;
|-&lt;br /&gt;
| $0010|| $002F|| Free Zero Page Addresses || 32&lt;br /&gt;
|-&lt;br /&gt;
| $0030|| $003F|| Used Zero Page Addresses for (xx),Y Addressing || 16&lt;br /&gt;
|-&lt;br /&gt;
| $0040|| $0041 || Current Address on screen of start of line || 2&lt;br /&gt;
|-&lt;br /&gt;
| $0042|| $004F|| Avaliable Zero Page Addresses || 14&lt;br /&gt;
|-&lt;br /&gt;
| $0050|| $00AF|| Number / Floating Point Stack for 16 numbers || 96 &lt;br /&gt;
|-&lt;br /&gt;
| $00B0||$00EF|| Available Zero Page || 64&lt;br /&gt;
|-&lt;br /&gt;
| $00F0|| $00FF|| Kernel Arguments in Zero Page || 16&lt;br /&gt;
|-&lt;br /&gt;
| $0100|| $01FF|| Hardware Stack of 6502 || 256&lt;br /&gt;
|-&lt;br /&gt;
| $0200|| $0228|| Basic mini-Kernel memory || 40&lt;br /&gt;
|-&lt;br /&gt;
| $0229|| $03FF|| Available Low Memory | Also used by Sound Command in BASIC || 470&lt;br /&gt;
|-&lt;br /&gt;
| $0400|| $041F|| Control Storage first 8 bytes control syntax highlighting || 32&lt;br /&gt;
|-&lt;br /&gt;
| $0420|| $0814|| Memory Storage || 1012&lt;br /&gt;
|-&lt;br /&gt;
| $0814|| $0FFF|| Available Low Memory || 2028&lt;br /&gt;
|-&lt;br /&gt;
| $1000|| $1FFF|| SuperBASIC Identifier Tables, allocated memory, string vars, stack || 4kb&lt;br /&gt;
|-&lt;br /&gt;
| $2000|| $77FF|| SuperBASIC Program Tokenized Code (grows Upward) || 22kb&lt;br /&gt;
|-&lt;br /&gt;
| $7800|| $7FFF|| Top 2k of SuperBASIC Program tokenize code or used for ML routines in low memory || 2kb&lt;br /&gt;
|-&lt;br /&gt;
| $8000|| $BFFF|| SUPERBASIC CODE || 16kb&lt;br /&gt;
|-&lt;br /&gt;
| $C000|| $DFFF|| I/O Memory Pages / Underlying Kernel Code (Selectable with I/O control Register)|| 8kb&lt;br /&gt;
|-&lt;br /&gt;
| $E000|| $FFEF|| KERNEL CODE || 8176&lt;br /&gt;
|-&lt;br /&gt;
| $FFF0|| $FFFF|| Reset Vectors and NMI / IRQ / BRK Vectors || 16&lt;br /&gt;
|-&lt;br /&gt;
| $01:0000|| $02:2BFF|| Default Memory used by BASIC bitmap graphics || 75kb&lt;br /&gt;
|-&lt;br /&gt;
| $02:2C00|| $02:7FFF|| Available High Memory || 21kb&lt;br /&gt;
|-&lt;br /&gt;
| $02:8000|| $02:F000|| Available High Memory | Used for BASIC Cross Development w/PC or MAC|| 32k&lt;br /&gt;
|-&lt;br /&gt;
| $03:0000|| $03:7FFF|| Used for Sprite Data in BASIC || 32kb&lt;br /&gt;
|-&lt;br /&gt;
| $03:8000|| $03:FFFF|| Available High Memory | Unless not running from Flash, Used for ROM Images|| 32k&lt;br /&gt;
|-&lt;br /&gt;
| $04:0000|| $07:DFFF|| Available High Memory || 248kb&lt;br /&gt;
|-&lt;br /&gt;
| $07:E000|| $07:FFFF|| Available High Memory | Being considered to be Reserved for Environmental Variables || 8Kb&lt;br /&gt;
|-&lt;br /&gt;
| $10:0000|| $13:FFFF|| Cartridge Expansion Memory (addresable only by CPU) || 256kb&lt;br /&gt;
|-&lt;br /&gt;
| $14:0000|| $1F:FFFF|| Future Expansions? || 768kb&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== More Resources ==&lt;br /&gt;
&lt;br /&gt;
=== This Wiki ===&lt;br /&gt;
&lt;br /&gt;
Explore all of the content of this Wiki, to expand your F256 series knowledge!&lt;br /&gt;
&lt;br /&gt;
=== Discord ===&lt;br /&gt;
&lt;br /&gt;
The [https://discord.com/invite/aAEQXZHXgM Foenix Retro Systems Discord] is the primary place to get questions answered.&lt;br /&gt;
&lt;br /&gt;
Also, if you resolve your question, and you didn&#039;t find the answer here on the Wiki, &#039;&#039;&#039;&#039;&#039;please consider contributing to the Wiki&#039;&#039;&#039;&#039;&#039;, for the benefit of others with the same question!&lt;br /&gt;
&lt;br /&gt;
=== Foenix Retro Systems Newletter ===&lt;br /&gt;
&lt;br /&gt;
Read back issues [http://apps.emwhite.org/foenixmarketplace/ here] (also a great source for sample programs).   &lt;br /&gt;
&lt;br /&gt;
Issues starting at #4 cover the F256 line.  Issues 1-3 cover the previous version of the hardware (C256), although there are still many salient points.&lt;/div&gt;</summary>
		<author><name>Eacontrerasd</name></author>
	</entry>
</feed>