Close
0%
0%

BASIC microcomputer, based on Arduino

A microcomputer with PS/2 keyboard, SD card storage and composite video output, running Terminal-BASIC

Similar projects worth following

Schematic

  • 1 × Arduino MEGA 2560 compatible board A core system, running Terminal-BASIC interpreter and producing video output
  • 1 × Arduino MEGA 2560 32Kb RAM expansion shield Add 32 Kb SRAM, used by BASIC programs
  • 1 × Arduino PRO mini PS/2 keyboard controller
  • 1 × RCA female socket Video output
  • 1 × PS/2 or DIN-5 female socket ps/2 keyboard input

View all 10 components

  • Software update

    Andrey Skvortsov06/11/2019 at 19:51 0 comments

    New software, I'v just built, based on Terminal-BASIC 2.1-b1. It uses russian lexems, because the computer is used by my 5 years old daughter, who don't understand English and still can't read latin alphabet. Also I use my new ps/2 keyboard Arduino library, from https://bitbucket.org/starling13/libps2 . This library supports locales switching and controls the keyboard LEDs, as can be seen on the photo.

  • Load BMP file from SD-card

    Andrey Skvortsov03/31/2019 at 20:52 1 comment

    Terminal-BASIC 2.0-rc introduced UNIX-style file operations. This video shows the process of loading 1-bpp BMP file from SD-card. Yes, it's damn slow. Image was loaded by the following BASIC program:

       1 DEF FN BN% (BYT%, BIT%) = (BYT% \ (2 ^ BIT%)) AND 1
      10 INPUT F$
      20 GOSUB  1000
     100 END
    1000 REM LOAD
    1010 BMP% = FOPEN ( F$ )
    1020 IF BMP% = -  1 THEN PRINT "FOPEN" : GOTO  1995
    1030 B% = FREAD ( BMP% ) : M% = FREAD ( BMP% )
    1040 S$ = CHR$ ( B% ) + CHR$ ( M% )
    1050 IF S$ <> "BM" THEN PRINT "HEADER" : GOTO  1990
    1060 FOR I% =  1 TO  8 : B% = FREAD ( BMP% ) : NEXT I%
    1070 DP% = FREAD ( BMP% )
    1080 DP% = DP% + FREAD ( BMP% ) *  256
    1085 DP%=DP%-12
    1090 IF DP% < 0 GOTO 1110
    1100 FOR I%=0 TO DP%-1 : B%=FREAD(BMP%) : NEXT I%    
    1110 FOR Y%=191 TO 0 STEP -1
    1120   FOR X%=0 TO 24
    1130     B% = FREAD(BMP%)
    1140     FOR XX%=0 TO 7
    1150       POINTC X%*8+XX%, Y%, FN BN%(B%,7-XX%)
    1600     NEXT XX%
    1700   NEXT X%
    1710   B%=FREAD(BMP%):B%=FREAD(BMP%):B%=FREAD(BMP%)
    1800 NEXT Y%
    1990 FCLOSE BMP%
    1991 S$=GET$()
    1992 IF S$="" GOTO 1991
    1995 RETURN

  • Alternative firmware

    Andrey Skvortsov10/29/2018 at 14:21 0 comments

    This computers firmware is a variant of my Terminal-BASIC. It suffers from heavy weight, due to my limited abilities and C++ it's written in, but it is important for me as the window in the world of language translators and learning desk.

    But I start to think about the alternative firmware, which is a compromise between the simplicity and flexibility. It will be based on Z80 CPU emulator.

    On the host side there will be a piece of C++ code. First component is an  interactive monitor, allowing to view/modify the Z80 emulator ram, load and store ram portions to or from SD card, may be some assemble/disassemble in the future. The second component is a Z80 emulator calls library, allowing to call the native C++ functions from the z80 code.

    The main purpose of this firmware is the ability to write programs in C, using sdcc for z80, store multiple programs to SD card and run it without reprogramming the Arduino flash.

    Unlike great projects, running CP/M emulator on Arduino DUE, this approach gives the ability to use the boards with a cople kilobytes of RAM to run simple programs, as long as CP/M will not run with less then 64k RAM, and more need to an emulator itself.

    Compared to the Terminal-BASIC, which allows to run programs from SD card too, I expect, compiled C code, running in Z80 emulator to be much faster.

  • BASIC-microcomputer emulator

    Andrey Skvortsov11/17/2017 at 11:06 0 comments

    I'v published the sources of BASIC-microcomputer emulator for PC. It runs on Linux and depends on posixcpp and SDL2 libraries.

    It can be used to debug major parts of BASIC-microcomputer firmware (terminal-basic interpreter, TVoutEx library etc.) and to test what BASIC-microcomputer can do.

    Minimal BASIC test programs, tetris game and other test programs can be found here.

View all 4 project logs

Enjoy this project?

Share

Discussions

Samu Kiiski wrote 01/20/2019 at 08:47 point

Nice computer you have there. I made Dan's single chip computer with graphics, sound, external joystick, integrated keyboard and everything inside handheld wooden case, where only one cable leads to TV. I have made several programs and soon I'm out of removable eeproms. It is time to upgrade. You are only one who has TVout-library (I quess?) and SD-card at the same time. Dan wrote about issues with SD, still I must try it. I already ordered SD-module and 16Mb card for it. Do you have any advice for me and may I contact you later for any upcoming questions?

  Are you sure? yes | no

Andrey Skvortsov wrote 01/20/2019 at 19:27 point

I tested terminal-basic with ATmega1284 single chip computer (https://www.youtube.com/watch?v=0uTYnNounNI#action=share) but without SD card. This item uses Arduino MEGA. I think the issue with SD card and Dan's computer is in that some pins. need to use SD card,  are used in his design.

Feel free to contact me as your work will have a progress.

  Are you sure? yes | no

Samu Kiiski wrote 01/21/2019 at 03:28 point

Pins are used by eeprom. I would leave eeprom off completely when using SD-card and have it use internal 4k memory instead. He has code for this included. I'll wait for china-snail-mail to arrive and see what are the first results out of the box if I try unedited Dan's code. I'll contact you then :)

  Are you sure? yes | no

spikepavel1985 wrote 05/18/2018 at 01:54 point

Yes, this project runs well on DUE. No problems were detected at startup. Also, all the functions of this interpreter are modular, which allows you to customize it for yourself.

  Are you sure? yes | no

Martian wrote 10/05/2017 at 19:11 point

I really like this project, very interested in this version of BASIC, I've been using TinyBASIC in my Arduino Computer projects, but it's very limited.

I wonder if this project could be replicated with an Arduino Due, with it's 96K of RAM and a SPI based SD adaptor.

Nice project. ;-)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates