[offtopic] retro computing VASM

General discussion for topics related to the FreeBASIC project or its community.
Post Reply
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

[offtopic] retro computing VASM

Post by D.J.Peters »

Last 2 month I enjoy my new "old" retro hobby :-)

First I wrote an 65xx 680x and Z80 disassembler,assembler and emulator in FreeBASIC.
But with my Z80 emulator I run in to an strange problem
and after more then 50,000 debugging steps I don't found the source of trouble.
(May be I set wrong CPU flags for subtraction with carry or my assembler write outs a wrong byte)

Currently I don't know is it the Z80 emulator or the Z80 assembler I wrote.

How ever to get a reference assembler I found the source code of vasm and created an Code::Blocks workspace and build many different versions of vasm.

homepage: VASM

I build it for:
MOS/Rockwell/WDC 6502 and Hudson Soft HuC6280
Motorola / HITACHI 6800, 6802, 6808, 6801, 6803, 68HC11
ZILOG etc. 8080/z80/gbz80/64180/RCMx000
INTEL: 8086, 80186, 80286, 80386 80486, 586 Pentium, 686 Pentium Pro, x86_64
AMD K6 AMD Athlon

Windows:
vasm-6502-32.exe / vasm-6502-64.exe
vasm-6800-32.exe / vasm-6800-64.exe
vasm-z80-32.exe / vasm-z80-64.exe
vasm-x86-32.exe / vasm-x86-64.exe

Linux:
vasm-6502-32 / vasm-6502-64
vasm-6800-32 / vasm-6800-64
vasm-z80-32 / vasm-z80-64
vasm-x86-32 / vasm-x86-64

download binaries: vasm.zip vasm.pdf are included

download source code: vasm-src.zip Code::Blocks workspace are included

By the way currently I have a Motorola 6803, ZILOG Z80, MOS 6502, AMD version of INTEL 286-10MHz running on breadboard's and have many fun with blinking LED's ;-)

Any other "RETRO computer coder" here on the forum ?

Joshy
andykmv
Posts: 58
Joined: Feb 12, 2015 9:50

Re: [offtopic] retro computing VASM

Post by andykmv »

this does look interesting - i have a few old pcbs including a z80 uP board by TECS electrnonics in aus, also interested in 8088, 8080, 6502, 6802, 6809 - also have a z80 emulator in hw for testing boards but it has been quite some time since i wrote any assembler. collecting some reference manuals for these as i have boards to repair.

so an emulator in freebasic win32 does look interesting as i could do some rom chip content testing with something like that...
a good place to look would be the mame emulator code to check your code against; a bit of work to translate the c/c++ code to fb but a thoroughly tested benchmark for comparison

and most of my recent uP programming has been avr !
Last edited by andykmv on Oct 11, 2019 7:24, edited 2 times in total.
andykmv
Posts: 58
Joined: Feb 12, 2015 9:50

Re: [offtopic] retro computing VASM

Post by andykmv »

does your emul software include any i/o devices such as leds or input values or switches? (sitting on the train at moment twiddling thumbs) ;)
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: [offtopic] retro computing VASM

Post by D.J.Peters »

The MOTOROLA 6803 emulator execute the TSR-80 MC-10 BASIC ROM, simple video output and keyboard input.
The MOS 6510 emulator executes the C64 BASIC ROM, simple video output and keyboard input.
The ZILOG Z80 emulator executes the Martell Aquarius BASIC ROM simple video output and keyboard input.

No switches LED's or logic gates at all.

Joshy
andykmv
Posts: 58
Joined: Feb 12, 2015 9:50

Re: [offtopic] retro computing VASM

Post by andykmv »

i remember Z80 Aquarius in the early 80's - white with blue keys on keyboard
andykmv
Posts: 58
Joined: Feb 12, 2015 9:50

Re: [offtopic] retro computing VASM

Post by andykmv »

your work on the vasm also made me think - are you considering writing a new target architecture module for freebasic ? i use a basic variant for the AVR from mcs electronics, bascom-avr - it is very good but is a proprietary tied to mcs electronics - if that business closes, my small scale micro controller projects will need to be redeveloped under another open source product rather than a proprietary product.

in fact, when i had that thought i did a quick search and found Great Cow BASIC 0.9 whose website states "...The syntax of Great Cow BASIC is based on that of QBASIC/FreeBASIC..." http://gcbasic.sourceforge.net/Typesett ... p/Download

how cool would it be to have a freebasic compiler target for AVR, microchip or z80 - even 8080 or 680x ? [now i know i am goin crazy ;) ]
grindstone
Posts: 862
Joined: May 05, 2015 5:35
Location: Germany

Re: [offtopic] retro computing VASM

Post by grindstone »

A freeBasic compiler for AVR would be GREAT!!!
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: [offtopic] retro computing VASM

Post by D.J.Peters »

AVR = ATMEL now MICROCHIP has nothing to do with retro computing ;-)

Joshy
grindstone
Posts: 862
Joined: May 05, 2015 5:35
Location: Germany

Re: [offtopic] retro computing VASM

Post by grindstone »

But an FB - AVR - compiler would be great anyway. :-D
andykmv
Posts: 58
Joined: Feb 12, 2015 9:50

Re: [offtopic] retro computing VASM

Post by andykmv »

D.J.Peters wrote:AVR = ATMEL now MICROCHIP has nothing to do with retro computing ;-)

Joshy
though one could argue that 8 bit computing is retro when one uses retro languages like basic, or assembler, but in this context a z80 target for freebasic sounded rather interesting!

have you managed to use vasm to isolate the problem to either your emulator or assembler ?

if you do end up sharing the source for your emulator and assembler, i would be interested as a number of the boards i have to repair are late 70's and early 80s some with z80 or 8080 cpus & others with 680x cpus. if you're into retro you can probably guess what they're for! means i also have to brush up on assembly for both target types. the z80 ice unit i have is the tauntek z80 ice which i plan to use for debugging some of those boards - and i am thinking about modifying the code and hardware interface for the ice to work with a fluke 9010/9020 since the z80 interfaces are going thru the roof in price! i also started tinkering with one of the fb ide projects as a possible shell for writing a rom burner for some old chip burners for said same boards.
Linuxbob
Posts: 60
Joined: Sep 01, 2010 1:03
Location: Ohio, USA

Re: [offtopic] retro computing VASM

Post by Linuxbob »

I am also a Z-80 hobbyist, from my Radio Shack days. Still have a Model 4P, along with a couple Timex/Sinclair computers (also Z-80 machines.)
Post Reply