v6502

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice.
monsonite
Posts: 48
Joined: 17 May 2018, 07:17

Re: v6502

Post by monsonite » 03 Jul 2019, 16:29

Hi Marcel,

Pleased to see your interest in VTL02.

I first came across this a few years ago when I found the original paper describing this "Very Tiny Language" which appeared initially in 1976 following the introduction of the Altair computer. It was quite an achievement to squeeze a usable, interpreted language into just 768 bytes of 6800 code.

The language was revisited some 30 years later with VTL-2 - here

http://www.altair680kit.com/manuals/Alt ... chable.pdf

Now that it has been ported to the 6502 and with added features it makes it accessible to the Gigatron, and chronologically correct for a machine inspired by mid-1970s TTL technology.

I'm looking forward to seeing it part of a future ROM offering.


regards


Ken

User avatar
marcelk
Posts: 329
Joined: 13 May 2018, 08:26

Re: v6502

Post by marcelk » 11 Jul 2019, 09:51

Testing has progressed. We can run Microchess now. Video: https://youtu.be/KBdDg5JfVs8

Screenshot 2019-07-11 at 17.06.35.png
Screenshot 2019-07-11 at 17.06.35.png (844.87 KiB) Viewed 297 times

Changes are:
  • It runs in full
  • On true TTL :-)
  • Without VGA timing errors
Microchess is about 1K in size and was written in 1976 by Peter Jennings for the KIM-1. The 6-digit hex output represents the KIM-1 LED display output. They give the piece, from-square and to-square. The commands I type:
  • C - Clear position
  • E - Exchange sides
  • P - Start thinking and make a move
  • Q - Quit into wozmon
It runs in "Super Blitz" mode to make it bearable. In the video you can see me change the VGA mode twice to speed up the program more.

I will push it into GitHub later after I have resolved a number of merge conflicts. Surprisingly, none concern the emulator itself.

User avatar
marcelk
Posts: 329
Joined: 13 May 2018, 08:26

Re: v6502

Post by marcelk » 13 Jul 2019, 13:34

Wozniak and Baum's 476-byte disassembler, looking at itself.

Screenshot 2019-07-13 at 15.32.58.png
Screenshot 2019-07-13 at 15.32.58.png (84.25 KiB) Viewed 262 times

monsonite
Posts: 48
Joined: 17 May 2018, 07:17

Re: v6502

Post by monsonite » 13 Jul 2019, 14:45

Marcel,

Another useful tool to make v6502 development easier.

I wrote a Z80 disassembler in BASIC whilst at school - but this is very concise.

Good Work!


Ken

User avatar
marcelk
Posts: 329
Joined: 13 May 2018, 08:26

Re: v6502

Post by marcelk » 01 Aug 2019, 19:28

Despite summer break, there's still some testing on the v6502 mode that crept through: VTL02 now works and is in GitHub. VTL-2 is a cute tiny interactive programming language that has its origins on the Altair 680. VTL02 is Mike Barry's port of it to the 6502. His port is still under 1K!

Screenshot%202019-07-28%20at%2013.51.40.png
Screenshot%202019-07-28%20at%2013.51.40.png (47.53 KiB) Viewed 173 times

It's small yet powerful. Here's a shootout with TinyBASIC in calculating the primes under 1000:

Code: Select all

VTL02 on v6502     TinyBASIC on vCPU
--------------     -----------------
10 N=7             10N=7
20 M=4             20M=4
30 D=5             30D=5
40 E=2             40E=2
50 X=N/D           50IFN%D=0GOTO100
55 #=%]100
60 D=D+E           60D=D+E
70 E=6-E           70E=6-E
80 #=N>(D*D)[50    80IFD*D<=NGOTO50
90 ?=" ";          90?" ";N;
95 ?=N
100 N=N+M          100N=N+M
110 M=6-M          110M=6-M
120 #=N<999[30     120IFN<999GOTO30
#=1                RUN
--------------     -----------------
Elapsed:           Elapsed:
1m14.9s            1m16.0s
v6502 and TinyBASIC nicely balance out their inefficiencies.

The other realisation I had the other day is that we now effectively have a second C compiler to toy with: cc65. This might be a quicker way to get existing SDcard/FAT C libraries running on the platform.

Post Reply