6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 7:00 pm

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Sun May 17, 2020 10:36 pm 
Offline

Joined: Sat Mar 11, 2017 1:56 am
Posts: 276
Location: Lynden, WA
I'm curious. How many here are doing all their coding on the machine they built? Using tools they created?


Top
 Profile  
Reply with quote  
PostPosted: Sun May 17, 2020 11:01 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1000
Location: Canada
I have a couple of versions of some of my builds that I program in BASIC. Usually to test ideas quickly. But while the BASIC is resident and I have done some tweaks, I can't claim to have built the base interpreter myself.

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sun May 17, 2020 11:22 pm 
Online
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
My workbench computer is still dependent on a host computer for development, one which has a text editor, mass storage, and an RS-232 port. It can use any processor, OS, and text editor you want, as long as you can mark a block and send that text out the RS-232 port as if to a serial line printer. The workbench computer takes that text and does its own compiling, assembling, or execution, as appropriate. I believe Dr Jefyll does the same thing but with a parallel port instead.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Mon May 18, 2020 12:02 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3346
Location: Ontario, Canada
Back in the day I was definitely into that -- creating and using my own tools. Most notable are the tools used for a series of microcontroller jobs starting in 1980 or thereabouts.

Hard to imagine, but back then microcontrollers were almost unheard of -- just barely a thing. You can be sure I was excited when I realized I'd be able roll my own Development System for the Intel MCS48 family, the first or maybe second microcontroller ever! (A Development System from Intel would've been stupidly expensive, utterly out of reach.)

The MCS48 chips are 40-pin devices, usually with three 8-bit parallel ports, 1K of (EP)ROM and *zero* RAM... well, almost. I knew enough Forth to write an MCS48 assembler that accepted proper Intel assembly source, and in an Intel databook I found enough info to build my own blaster for the EPROM versions such as 8748 and 8741. One-chip computers!!! :shock: :shock: :shock:

The host system was my 128 KByte KIM-1, running FIG Forth. The attached mass storage was a Z80-based homebrew floppy disk system equipped for 5" at first, later upgraded for 1.44 MB 3". All of this was before I acquired my first DOS box.

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Mon May 18, 2020 12:14 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3346
Location: Ontario, Canada
GARTHWILSON wrote:
I believe Dr Jefyll does the same thing but with a parallel port instead.
It's true. Nowadays I'm much more likely to edit and store the source code on an x86 box. When I'm ready I'll squirt it out to PRN, and KK (my KIM-1's successor) thinks it's a human typing at KK's keyboard.

But, back in the day, KIM-1 was the only computer I owned. It was used for everything, including creation of the code (using a homebrew editor and a TV adapted as a monitor) that eventually supported the MCS48. FWIW there are a few photos in this post.

Nowadays there's little coding activity for my beloved homebrew systems, self-hosted or otherwise. They're mostly just a leisure pursuit; a hobby... :|

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Last edited by Dr Jefyll on Tue May 19, 2020 3:57 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Mon May 18, 2020 12:19 am 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1000
Location: Canada
Dr Jefyll wrote:
The host system was my 128 KByte KIM-1, running FIG Forth.
-- Jeff

Holy ceramic memory chips, Batman! That's one heck of a Kute Kim.



I'm utterly humbled by the brains on this site. There are so many great minds here I'd hate to try to make a list lest I leave someone deserving off. I mean that too.

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Mon May 18, 2020 1:25 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
Not just x86 - you can just as easily use an ARM host nowadays, with a Raspberry Pi. In some ways, interfacing one to your SBC to transfer the build is also easier.


Top
 Profile  
Reply with quote  
PostPosted: Mon May 18, 2020 6:31 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1399
Location: Scotland
Dan Moos wrote:
I'm curious. How many here are doing all their coding on the machine they built? Using tools they created?


I started (and still use) ca65 (from the cc65 suite) for development on my Ruby 6502 and '816 systems. I also created a cc65 target for it, so can do ASM and C on a Linux host.

My ultimate aim is for Ruby'816 to be self-hosting. So it has a filing system, serial interface and it runs BBC Basic.

For a while I looked at C running natively (I did use Aztec C on an Apple II in the early 80's and another C on a CP/M system) but I remembered compiling being very slow back then - probably no better today. Quite limited too, so I've settled on BCPL. I did a lot of BCPL coding in the 80s on the 6502 based BBC Micro) So now I have a 32-bit BCPL system running on the '816. The low-level OS is an Acorn MOS look-a-like (BBC Micro operating system) which I wrote from scratch The BCPL Cintcode (the name of the bytecode the compiler generates) interpreter (32-bit bytecode VM thing) is all written in ASM with a C front-end which I'm slowly re-writing in a mixture of ASM and BCPL. The upper level "OS", program launcher, command-line interface, etc. is all in BCPL.

Todays task is compiling the complier directly on it, then finish porting my little text editor (currently in C) to it.

I could use BBC Basic with its built in assembler to generate the assembly stuff for the lower level OS, but it's 65C02 only and I need 65816, so I'll be looking to write an assembler in BCPL for it at some point.

Running a 32-bit VM on a 16 bit micro with an 8-bit data bus is never going to be the fastest thing, but here is 1000 digits of Pi it calculated in just over 11 minutes as part of my testings... And there is a Mandelbrot here https://unicorn.drogon.net/mand.b.txt that runs in about 14 seconds. (these are interesting diversions, but do make good testing programs when you can run them on other platforms and compare the outputs)

Code:
Time taken: 671615
pi = 3.+
1415926535 8979323846 2643383279 5028841971 6939937510
5820974944 5923078164 0628620899 8628034825 3421170679
8214808651 3282306647 0938446095 5058223172 5359408128
4811174502 8410270193 8521105559 6446229489 5493038196
4428810975 6659334461 2847564823 3786783165 2712019091
4564856692 3460348610 4543266482 1339360726 0249141273
7245870066 0631558817 4881520920 9628292540 9171536436
7892590360 0113305305 4882046652 1384146951 9415116094
3305727036 5759591953 0921861173 8193261179 3105118548
0744623799 6274956735 1885752724 8912279381 8301194912
9833673362 4406566430 8602139494 6395224737 1907021798
6094370277 0539217176 2931767523 8467481846 7669405132
0005681271 4526356082 7785771342 7577896091 7363717872
1468440901 2249534301 4654958537 1050792279 6892589235
4201995611 2129021960 8640344181 5981362977 4771309960
5187072113 4999999837 2978049951 0597317328 1609631859
5024459455 3469083026 4252230825 3344685035 2619311881
7101000313 7838752886 5875332083 8142061717 7669147303
5982534904 2875546873 1159562863 8823537875 9375195778
1857780532 1712268066 1300192787 6611195909 2164201989


Ultimately I want to port a BASIC interpreter I wrote in C a few years back to BCPL with the aim of making it a compiler producing the bytecode that the underlying BCPL system uses. It would never be as fast as BBC Basic (nothing ever will be!) but it would be nice to use my own BASIC on a 'micro' rather than my Linux desktop.

Cheers,

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Mon May 18, 2020 7:50 am 
Offline

Joined: Sat Jun 04, 2016 10:22 pm
Posts: 483
Location: Australia
I normally cross-assemble, since Ittiara(my system) isn't great to code on at present, and it's a bit annoying to get it to write to its own EEPROM (I've not set up an easy way to do that yet). The fact that it doesn't have any real external storage capability doesn't help either.
I haven't written an assembler, but I have used a couple of them that run on the 65c02 that other people have written.

The A1-Assembler is an assembler written for the A-One(a re-implementation of the Apple 1), by the same person who wrote the SB-Assembler(which I curently use). It relies on the Woz Monitor, though an extended one known as EWOZ also works for the purpose, and I think it should be relatively easy to replace.
Tali Forth 2 isn't quite a traditional assembler, but it includes a set of words for laying down machine code in a Forth word, sort of like BBC BASIC's built-in assembler.


Top
 Profile  
Reply with quote  
PostPosted: Tue May 19, 2020 2:06 pm 
Offline

Joined: Sat Dec 12, 2015 7:48 pm
Posts: 122
Location: Lake Tahoe
Although I don't have my own SBC (yet), a major goal of developing PLASMA was to be able to run it on the metal. Similar to drogon's approach, PLASMA (taking many cues from BCPL and later B) is simple enough to compile in a single pass in-memory. Building programs up from smaller compiled modules and run-time linking reduce the need for creating large monolithic binaries.

The edit-compile-run cycle is quite fast on an 8 MHz 65802 and solid state storage. It is still reasonable on a 1 MHz 6502 and floppy drive - not the forever nightmare of Aztec C on floppies or the patience-testing of UCSD Pascal.

I admit to still cross-building the base system on modern HW, but nothing beats sitting down to a proper keyboard for non-distraction coding.


Top
 Profile  
Reply with quote  
PostPosted: Tue May 19, 2020 8:39 pm 
Offline

Joined: Sat Dec 24, 2016 11:00 pm
Posts: 28
Location: Southern California
I do develop code directly on my build in Forth, using a 6522-attached micro-SD card as storage. I have a nearly-complete assembler hosted on the build too (nearly complete means that's opcode-complete but needs some work for both the label table and for actually outputting executables) but for the most part, I'm cross-assembling from my laptop.

Given that my machine doesn't have its own keyboard or display but that I'm talking to it through a serial line from my laptop already anyway, that seems like a natural thing. Plus, developing on the laptop means access to git, to backups, etc. I want to get the machine to the point where it's self-hosting but I suspect that there will always be multiple platforms involved in the larger process.

_________________
Mite 6502: http://www.dourish.com/projects/mite.html


Top
 Profile  
Reply with quote  
PostPosted: Tue May 19, 2020 10:59 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 565
I cross assemble, as modern assemblers are much more powerful than that sort that we hosted on 6502 builds.

But when I program in Forth I often code directly on my SBC.


Top
 Profile  
Reply with quote  
PostPosted: Wed May 20, 2020 10:33 am 
Offline

Joined: Wed Nov 18, 2015 8:36 am
Posts: 102
Location: UK
This is exactly what I wanted to do! My aim was to build a computer which was kinda equivalent to what one might have bought for the home in the early 80s - so one had to be able to program on it without another host.

The initial work had to be done on a PC - I used an assembler called AS65 by Kingswood Consulting.

What I built with that assembler is a fairly comprehensive version of BASIC from scratch - which by the way I call dflat as a humour homage to a well known language from Microsoft!

I could have ported the many BASICs and other languages, but part of the motivation was self-learning and hobby.

So now I had a computer that I could program on without any external host... so I have written a few small games just to show that it is a viable language..

I wrote a reasonably good (IMHO!) version of Tetris, which I actually play from time to time!

Recently I decided to add an inline assembler to dflat - so now the language is getting close to the capabilities of the awesome BBC BASIC :-)

This let's me make even better games / real-time programs on my homebrew machine. But defining graphics is a pain, so I am writing in dflat a character editor to allow me to build all my graphics and save it away as a font file. This will be a genuinely useful tool for me - built without an external host..


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: