-
More alphabets and where the project is going
08/13/2017 at 20:36 • 3 commentsI love language so I decided to add some new alphabets. I added the characters in the Cyrillic alphabet that are used in Russian, plus the characters from an alphabet I made up for fun a while back.
Now I can print with more characters:
On top: Hello World!
On bottom: Hello (Informal)
Benefits:
- more alphabets
- smaller text (so more can fit on the screen)
- adjustable character length
Drawbacks:
- Slower loading and displaying
- Only white characters are supported - no green or red
- can't really mix with Latin alphabet due to size and interface differences
I also ported a simple game I made for the ATmega328p a few years back:
Other than those things, however, my project is so far somewhat useless. The biggest drawback is that it isn't currently possible to execute some generic program: all must be hard coded into the OS (essentially). Well, I remember a while back reading that Java had been ported to AVR - uJ. Adding this and enabling Ethernet would allow community made programs to be downloaded and executed to the Arduino Desktop without the aid of another computer. Not that it has a community - but you hopefully get the point. Java enables a useful stand alone system. Also, since I have the extra 32KiB RAM I have more room for programs, plus graphics and keyboard.... Soon hopefully Ethernet and SD support too.
-
void system(char* input){ ... }
08/01/2017 at 20:40 • 0 commentsC++ has this function, system(), that executes a command. If I want a command line for my arduino computer, I might as well implement this function.
My friend, @Andrey Skvortsov, sent me an arduino shield that makes the arduino a ton more powerful. It adds 32KB of SRAM, but its parallel, not serial. Furthermore it maps directly into the AVR address space, so you don't have to manipulate pins. Its basically an extra 32KB blazing fast SRAM addition for the Arduino MEGA. I have barely used it to any potential, but I have begun making memory allocation functions and such for it, so I can go farther. My system function actually uses the shield, and removing the shield breaks the system() function. SO the shield works! See that project here: #Arduino MEGA 2560 32Kb RAM shield
I had the arduino auto-execute these commands:
sudo
sudo -f
terminate 0
lspsOutput:
The sudo command is like linux : get elevated permissions. I added sudo -f, f as in FORCE. Basically force events to occur where possible. So the "Self-hacking ENABLED" is from sudo -f. terminate 0 : terminate process 0 (but there was no process, so we get error bad PID). lsps is LiSt ProceSses. It said "0 processes:", because no processes were executing.
Now I am working on a terminal and will add more commands later. Terminal, for now, will block all other processes until exit. Multitasking terminals, as I have discovered, aren't the easiest.
-
Progress of new architecture and File System work
05/20/2017 at 23:38 • 0 commentsI took a break from this project for a while, but I have come back. I have a basic terminal with one command working, along with a file system. The terminal has only a help command that prints a string on the screen. I have working file IO now. File IO works kinda.... different. Basically instead of accessing the SD card directly by the emulated CPU in the Arduino, the SD library's functions are mapped to the CPU's emulated hardware IO. This does a few things:
- Makes there no need for a complex file system driver
- SD card library functions are faster because they are not run on an emulator
- I don't have to find a way to directly read/write bytes on the SD card
Think of it like having a filesystem driver (software) mapped to your CPU's hardware IO.
I will do something similar for network access. So that my OS can download updates to the SD card.
-
New (And superior) CPU architecture
05/18/2017 at 03:42 • 0 commentsI'm pretty much no longer going to use the old MMC architecture. I now have a simpler, faster, and generally better CPU architecture I designed. I will also use it for my FPGA computer. Most instructions are one or two bytes, as opposed to my older architectures that took WAY too many. It's still WIP, but it has run on the Arduino Desktop and works well in place of the MMC architecture.
-
Network Boot for MMC Emulator
05/04/2017 at 04:43 • 0 commentsVideo Explains All
Basically I made the MMC emulator be able to download a binary image from the internet to boot from. SUPER COOL! In my opinion :D
-
Playing with some older ideas
04/29/2017 at 04:55 • 0 commentsI decided to try porting an ancient emulator I wrote to my Arduino Desktop. A while ago I built what I call the MMC. It has nothing to do with MMC cards, MMC stands for Modular Mega Computer. It was pretty cool, except low specs (not enough disk space, too difficult to program, and bad graphics) made it quickly useless. The best part about it however was the MMC Processor design. This was a 16-bit CISC processor that is probably the best processor design I ever made - and has the absolute WORST documentation.... I stumbled upon the assembler I wrote for it, and decided to look for the Arduino file. I knew its name stated with computer, but that's not too helpful because I literally polluted my arduino sketchbook with files like "Computer_1", "Computer_2", "Computer_160512", or whatever. After looking through a few files I found it.
After porting it and fixing some weird problems with the assembler I got it to run on my mostly unmodified arduino desktop. All I added was a new Seeed studio Ethernet shield V2, which I don't intend on removing. I also redesigned it to boot from a SD card, instead of a parallax SmartCard like before.
I got a hello world program to boot if the SD card couldn't be booted, so everything is working so far! SD card won't boot right though - Always there is an Invalid Opcode Error.
I will continue testing to see if I want to switch to my MMC architecture, or keep my Arduino Multitasking OS. I must admit, MMC is very tempting...
-
Terra now has entities to fight - and low RAM
04/16/2017 at 09:05 • 10 commentsI added this creepy character inspired - again - by Terraria that follows the player around, then comes down and attacks. Easy to kill (for now) and only one. OS is good as ever but RAM is running low. I really should optimize. What I need is dynamic memory allocation. Well, here is a video on my Terra progress:
The internet seems to think that arduino memory allocation functions (malloc/free etc) dont work well. Is this true? Any alternatives?
-
Terra graphics issues - resolved
04/15/2017 at 07:39 • 0 commentsWhile making the game Terra (a clone of Terraria for Arduino) I realized the graphics were drawing way too slowly. This is a problem I commonly find in anything that draws graphics from an arduino. The problem was that rendering each block was very slow. My solution was to tessellate the blocks by finding rows of the same blocks and filling them with the same color. Took me some time to perfect this, and it can DEFINITELY be improved (larger tessellation : bigger than just rows). Here is what the game is currently looking like:
I have a little character in the center. Instead of moving the character I move the environment. This is for two reasons:
A: Not all of the world is visible at any given time. This allows the easy drawing of the part of the world currently being seen.
B: The character has a different set of 4 colors than the world. So if the player moved I would have to recolor tiles a TON. Not good. (Each tile can only use 4 colors)
Well, so far Terra has controls, working tessellation for fast redraws, and a randomly generated world. But super long ways to go. This should be better than paying for the game XD.