A 16-bit computer/maybe console inspired thing, the Femto-4. This will be the main branch and backups will be forks from it. This project was started around November 2020.
Currently runs:
- Cart A: Flappy Bird
- Cart B: Some Pixel Art
- Cart C: Screensaver
- Cart D: Snake
- Cart E: Phemton Demonstrations
- Cart F: Competitive Snake
- Cart G: Tic Tac Toe
- Cart H: Connect 4
- Cart I: NIM
- Cart J: Bad Apple
- Bundle Cart: All carts in one
- Cart 2A: 32×32 Snake
- Cart 2B: 32×32 Competitive Snake
- Cart 2C: 32×32 Pixel Art
- Cart 2D: 32×32 Bad Apple
- Bundle Cart 2: All 32×32 carts in one
Assembler:
- https://repl.it/@Sanderokianstfe/Femto-4-Assembler#DeveloperGuide.txt
- https://github.com/Comerstar/PhemtonCompiler/blob/main/Assembler/DeveloperGuide.txt
Compiler:
- https://replit.com/@Sanderokianstfe/Femto-4-Compiler#PhemtonDeveloperGuide.txt
- https://github.com/Comerstar/PhemtonCompiler/blob/main/PhemtonLiteCompiler/PhemtonDeveloperGuide.txt
The 256-Series:
Cart Notes:
Cart A:
- The first cart written for the Femto-4.
Cart B:
- The sprites in the cart are:
- A: Femto-4 Logo.
- B: Madeline from Celeste.
- C: Madeline from Celeste (again).
- D: Part of you aka Badeline from Celeste.
- E: A strawberry from Celeste.
- F: Standing Mario from Super Mario Bros.
- G: Jumping Mario from Super Mario Bros.
- H: Standing Mario from Super Mario Bros 3.
- I: Running Mario from Super Mario Bros 3.
- J: Sanderokian (my own character).
Cart C:
- Enter anything into the keyboard to randomise the colours.
- Enter r into the keyboard to reset the colours.
Cart D:
- WASD Pad is recommended.
- Game settings (enter the letter before starting the game to use the setting):
- e: toggle whether crashing into the edges results in a game over.
- The two modes (with/without edge collisions) have two separate high scores.
- w: change the snake’s colour scheme to white.
- r: change the snake’s colour scheme to red.
- y: change the snake’s colour scheme to yellow.
- o: change the snake’s colour scheme to orange.
- p: change the snake’s colour scheme to purple.
- a: change the snake’s colour scheme to aqua.
- g: change the snake’s colour scheme to green.
- b: change the snake’s colour scheme to blue.
- m: change the snake’s colour scheme to magenta.
- 1: change the snake’s colour scheme to pink.
- 2: change the snake’s colour scheme to light blue.
- 3: change the snake’s colour scheme to the challenge colour scheme with an invisible body.
- 0: randomise the snake’s colour scheme.
Cart E:
- The test codes in the cart are:
- 1: Hello World.
- 2: Single Operator Calculator.
- 3: Exponentiation Calculator.
- 4: Fibonacci Calculator.
- 5: Keyboard to TTY Test.
- 6: Keyboard to TTY LDI LID Test.
- 7: Keyboard to TTY LII Test.
- 8: Keyboard to TTY LIA Test.
Cart F:
- WASD Pad is essentially required.
- Game settings (enter the letter before starting the game to use the setting):
- e: toggle whether crashing into the edges results in a game over.
- w: toggle whether the number of wins each player has is tracked.
- s: toggle whether the total score each player has scored is tracked.
- d: display the total wins and total scored.
- r: reset the tracked statistics.
Cart G:
- The small light in the corner indicates which player’s turn it is.
- When it is dimmed, it means that the computer is processing that player’s turn.
- Game settings (enter the letter before starting the game to use the setting):
- w: toggle whether the number of wins each player has is tracked.
- s: toggle automatic start player swapping. d: display the wins each player has.
- r: reset the wins each player has.
Cart H:
- The bar at the top indicates which player’s turn it is.
- When it is dimmed, it means that the computer is processing that player’s turn.
- Game settings (enter the letter before starting the game to use the setting):
- w: toggle whether the number of wins each player has is tracked.
- s: toggle automatic start player swapping.
- d: display the wins each player has.
- r: reset the wins each player has.
Cart I:
- Game settings (enter the letter before starting the game to use the setting):
- w: toggle whether the number of wins each player has is tracked.
- s: toggle automatic start player swapping.
- d: display the wins each player has.
- r: reset the wins each player has.
- i: display the game instructions.
- c: toggle the whether player 2 is played by the computer.
Cart J:
- Plays Bad Apple
- There are no further controls
Cart 2A:
- The options are the same as Cart D.
Cart 2B:
- The options are the same as Cart F.
Cart 2C:
- The sprites in the cart are:
- A: Femto-4 Logo.
- B: Sanderokian (my own character).
- C: Alstran (my own character).
Cart 2D:
- Plays Bad Apple on the larger screen
- There are no further controls
Features:
- Immediate, direct, & indirect memory access.
- Jumps & conditional jumps.
- 16-bit address space.
- Switchable memory banks, allowing for a standard cart to hold up to 1MB of data.
- An ALU capable of logical operators, addition, subtraction, shift left, shift right, multiplying, dividing, & other specialised functions.
- Fast execution – can run more than one instruction per clock cycle.
- 16×16 pixel display with 32 sprites and 15-bit direct colour.
- 32×32 pixel display with 32 sprites which can have up to 18-bit direct colour.
- Two controllers, a keyboard mapping for the controllers, & a keyboard for text inputs.
- RNG, TTY, stack, & save memory.
- Von Neumann Architecture.
- Assembler & compiler (written in Python).
- Twelve pre-written carts to play with.
Updates:
v1.0:
- Finished the project and added Cart A.
v1.1:
- Added Cart B, some Pixel Art.
- Fixed GRF, & AXR instructions.
- Made Bootloader clear TTY, Keyboard, & Controller Pushed.
- Updated Cart A & Cart B to make use of AXR instructions.
v1.2:
- Added Cart C, a Screensaver.
- Updated Cart B to respond to the start button on both controllers.
v1.3:
- Added Cart D, Snake.
- Moved to new project to fix issues around searching for projects branched from private projects.
- Removed unnecessary EEPROM banks and write lines from all carts.
- Made Reset clear WRAM and the General Registers.
v1.4:
- Fixed Keyboard.
- Added a Bundle Cart that allows you to view all the carts without changing carts (you must reset the console to view another cart).
- Fixed bug in the standard bank design which wrote data to incorrect addresses.
- Fixed contention issue in Mult.
- Added Annotations to the In Debug.
v1.5:
- Added Snake Player.
- Added Reset & Power labels to the relevant buttons.
v2.0:
- Further optimisation to reduce lag/increase execution speed.
- Added more memory access options.
v2.1:
- Further optimisation of the CU.
- Added a keyboard to controller mapping.
v2.2:
- Continued optimisation and overhaul of the CU.
- Removed old CU & compare circuits.
- Added additional stack access instructions.
- Updated the debug versions with the changes, as well as fixing bugs in the debug versions.
- Designed a Logo for the Femto-4.
- Rewrote Cart C to allow the sprites to be viewed in any order, and added the logo to it.
v2.3:
- Introducing Phemton Lite, the first version of the Femto-4’s high level languages.
- Added a link to Phemton Lite’s compiler.
- Added Cart E to demonstrate code written in Phemton Lite