6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 9:11 pm

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Aug 12, 2022 5:09 pm 
Offline

Joined: Fri Aug 12, 2022 4:34 pm
Posts: 3
Hi everyone!

Hope everyone is doing well. I have a project that I've been working on off and on and I wanted some input and help. I'm currently building Grant Searle's 6502 microcomputer. It will run off of serial via an RS232 USB adapter. Currently, the chips that I'm working with are the 65(C)02, the 68B50, some logic gates (74xx series), an AT28C256, and a 62256. Together, these will make a machine similar (but not quite like!) the Apple 1 or the KIM-1. It will be ran through a computer using PuTTY or other terminal software. Unfortunately it is not complete, but I'm planning on completing it at the beginning of next year or so.

Grant has graciously provided those who want to build this amazing machine with both binary and hex files that contain Microsoft BASIC that was found on the Apple I in 1976/77. While this is nice, I'd like to put my own spin on it. So my question to you is this...

Can you put other forms of BASIC (Commodore/PET BASIC, AppleSoft BASIC, etc.) on this computer???

I've been searching up and down for the answer but I haven't found anything yet. I have the original KIM-1 BASIC file, but KIM-1 and Microsoft are the only BASICS that I can find that this machine is capable of running. If I can, how would I go about doing this? I do have some C64 firmware bin files but I'm not sure they'll work. I've gotten them from here: http://www.zimmers.net/anonftp/pub/cbm/ ... index.html.

One other question I have is can you add hardware interfaces on this like a datasette, sound card, etc., and if so how? I know a lot about computers but not enough to figure this one out :( :( :( Any and all help is greatly appreciated!!!

Here's the project link for those interested: http://searle.x10host.com/6502/Simple6502.html. Besides a 6502, he's built Z80 and 6800/6809-based systems.


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 12, 2022 6:14 pm 
Offline

Joined: Wed Nov 11, 2020 10:42 pm
Posts: 104
Location: Kelowna Canada
Hi
Welcome to the world of 6502 enthusiasts. I am hardly qualified to give hardware advice but as someone who started out with a SYM-1 in 1980 (still have it) and who rediscovered my passion through Ben Eaters's video series I have been pleased to find this forum. You may build and modify from the basic 6502 board on Grant's pages (I believe it's OSI Basic he provides) depending on your skills and interests. There are people here who have designed their own 65(c)02 computers who can offer great advice, but you need to be fairly specific in your goals and questions. Almost all the Basic's are based on Microsoft's version (and EHbasic of Lee Davison) with the nitty gritty of interacting with the user dependent on the hardware in your design. Program saving and loading will be your first challenge once you are up and running. Graphics are another matter. If you want to interact with the outside world consider adding a 65c22 which will make it easier to light LEDs, or even talk to a SD Ram card for storage.
I have built a multicomp of Grant's design using a FPGA and the designed PCB for it from Retrobrew wiki pages. I have also built Rich Cini's version of the SBC2.7 (based on Daryl Rictor's design) as well as a CRC65 from Plasmo here on the forum. There are many options depending on your goals and interest.
I'm sure others will chip in and welcome you. There are great resources here, but look around, think about what you hope to achieve and ask specific questions as you move along.


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 12, 2022 7:34 pm 
Offline

Joined: Fri Apr 06, 2018 4:20 pm
Posts: 94
ASPEN32 wrote:
Hi everyone!

Hope everyone is doing well. I have a project that I've been working on off and on and I wanted some input and help. I'm currently building Grant Searle's 6502 microcomputer. It will run off of serial via an RS232 USB adapter. Currently, the chips that I'm working with are the 65(C)02, the 68B50, some logic gates (74xx series), an AT28C256, and a 62256. Together, these will make a machine similar (but not quite like!) the Apple 1 or the KIM-1. It will be ran through a computer using PuTTY or other terminal software. Unfortunately it is not complete, but I'm planning on completing it at the beginning of next year or so.

Grant has graciously provided those who want to build this amazing machine with both binary and hex files that contain Microsoft BASIC that was found on the Apple I in 1976/77. While this is nice, I'd like to put my own spin on it. So my question to you is this...

Can you put other forms of BASIC (Commodore/PET BASIC, AppleSoft BASIC, etc.) on this computer???

I've been searching up and down for the answer but I haven't found anything yet. I have the original KIM-1 BASIC file, but KIM-1 and Microsoft are the only BASICS that I can find that this machine is capable of running. If I can, how would I go about doing this? I do have some C64 firmware bin files but I'm not sure they'll work. I've gotten them from here: http://www.zimmers.net/anonftp/pub/cbm/ ... index.html.

One other question I have is can you add hardware interfaces on this like a datasette, sound card, etc., and if so how? I know a lot about computers but not enough to figure this one out :( :( :( Any and all help is greatly appreciated!!!

Here's the project link for those interested: http://searle.x10host.com/6502/Simple6502.html. Besides a 6502, he's built Z80 and 6800/6809-based systems.


You could technically port any 6502 BASIC to it that would fit in 16KB ROM and 32KB RAM. There are probably quite a few that would fit. However, many of the most popular 6502 basics (Later versions of Apple BASIC, Commodore PET/V20/C64, etc.) are not designed for terminal input/output you would have to do some work. IIRC Grant's design also does not have a VIA or graphics, so you don't have a timer or GPIO and any graphics/sounds commands wouldn't work, etc.


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 12, 2022 8:25 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
Welcome.

ASPEN32 wrote:
Grant has graciously provided those who want to build this amazing machine with both binary and hex files that contain Microsoft BASIC that was found on the Apple I in 1976/77. While this is nice, I'd like to put my own spin on it. So my question to you is this...

Can you put other forms of BASIC (Commodore/PET BASIC, AppleSoft BASIC, etc.) on this computer???

Look into EhBASIC. I have not used it, but when I looked over its instructions and other documentation years ago, I was impressed with how good and extensive it appears to be, considering the smallish quantity of memory it has to run in on a 6502. This is from my links page:



Quote:
One other question I have is can you add hardware interfaces on this like a datasette, sound card, etc., and if so how?

Do a forum search for "tape modem". We have several topics on it. A simple-ish way to do it is to put a UART's or ACIA's serial signals through a modem. You might need to replace Searle's 6850 though, as a severe shortcoming of the 6850 is that it doesn't have its own onboard baud-rate generator, and without looking at his diagram again, I'm not sure you can get a baud rate that's suitable for this. Once you have a UART or ACIA, you could even have the modem be external and connect it to any computer of your own creation that has asynchronous serial I/O. As often as this comes up, I really should put a diagram of a complete modem on the 6502 primer's "circuit potpourri" page. All the parts are really cheap.

For other stuff, the W65C22S VIA has a lot of capability, as mentioned by okwatts. I give lots of ideas in the 6502 primer, particularly the I/O ICs page and the circuit potpourri page. (Do go through the whole primer though which covers the many aspects of making your own 6502 computer. It's in 22 pages that are purposely organized in a logical order. It was written to answer questions and problems that kept coming up on the forum, and give suggestions of how to do various things that probably didn't occur to most readers.)

_________________
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: Fri Aug 12, 2022 8:55 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
I have also used Enhanced Basic for my C02 Pocket SBC. I started with the older 2.22 version, then rewrote parts of it to take advantage of CMOS instructions and addressing modes. I also removed the interrupt functions, as they didn't actually work. Overall size is just under 10KB. The built-in monitor parts have also been removed... as they would likely either need to be modified or replaced depending on the hardware you're trying to run it on. The CMOS version only requires a character in and character out routines at a minimum. I also added code for LOAD and SAVE that uses the Xmodem-CRC transfer code in my C02 Monitor. This provides an easy LOAD and SAVE as upload and download via a terminal program, such as Putty.

Here's a link to the CMOS version that has Klaus' latest P5 patches:

viewtopic.php?f=5&t=5760&start=15#p76030

You can also look at my C02 Monitor/BIOS code on my Github page should you care to use it as a start for getting EhBasic running on your new system.

Have fun!

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 13, 2022 12:18 am 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1007
Location: Canada
I have put EhBASIC and Tom Pitman's Tiny Basic on. I also modified the address decoding to give more ROM space. I think you'd have to do that mod to get EhBASIC to fit as it takes up 12K.

The mod gives you ROM from $8000 - $EFFF and from $F800 - $FFFF. The ACIA is still at $F000 and the new decode splits the IO space up into 8 segments with decodes for each for adding other devices.

If you interested I can post everything here.

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 13, 2022 8:07 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
If you're willing to try Tiny BASIC, it's not a big step down to check out VTL02, which fits in 1KB of ROM.

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 13, 2022 9:03 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
At the other extreme, Acorn's BBC Basic might be possible: it's a nominal 16k already and you need a few bytes at least for an OS shim, but the result would be rather special. (There's a project right now doing this for 6809/6309 but that's slightly different as the code in that case is denser.)


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 13, 2022 9:16 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
GARTHWILSON wrote:
Look into EhBASIC. I have not used it, but when I looked over its instructions and other documentation years ago, I was impressed with how good and extensive it appears to be, considering the smallish quantity of memory it has to run in on a 6502.

BigEd wrote:
At the other extreme, Acorn's BBC Basic might be possible: it's a nominal 16k already and you need a few bytes at least for an OS shim, but the result would be rather special. (There's a project right now doing this for 6809/6309 but that's slightly different as the code in that case is denser.)

Ah yes, I should have mentioned that one too, another one that looked outstanding (although it's yet another one I have not actually used).

_________________
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: Sat Aug 13, 2022 9:20 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1488
Location: Scotland
BigEd wrote:
At the other extreme, Acorn's BBC Basic might be possible: it's a nominal 16k already and you need a few bytes at least for an OS shim, but the result would be rather special. (There's a project right now doing this for 6809/6309 but that's slightly different as the code in that case is denser.)


After Apple (Integer) BASIC and AppleSoft, EhBASIC, I put BBC Basic into my Ruby 6502 system... It does require some support and you can make it run if you emulate just a few of the Acorn Machine Operating System calls, but my little project eventually turned into something about 10KB in size which provided the right timer interrupts, BRK vector handling and many other features in addition to the few OSBYTE and OSWORD Calls that BBC Basic requires to run.

More details here: https://mdfs.net/Software/BBCBasic/6502/

But if you're got the space then go for it and you'll have a fast and modern BASIC for your 6502 system.

-Gordon

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


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 13, 2022 10:07 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Ha ha - 10k is much more than I was thinking of! Maybe a couple of hundred bytes, surely less than 2k, and with the hope that there's some slack in the original 16k to condense down and cram everything in.

(Of course, Acorn's originals did have 16k Basic, 16k OS, and optionally 16k filesystem, so 10k isn't bad for a fully-featured system. But I'm thinking of just serial I/O.)


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 13, 2022 11:08 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1488
Location: Scotland
BigEd wrote:
Ha ha - 10k is much more than I was thinking of! Maybe a couple of hundred bytes, surely less than 2k, and with the hope that there's some slack in the original 16k to condense down and cram everything in.

(Of course, Acorn's originals did have 16k Basic, 16k OS, and optionally 16k filesystem, so 10k isn't bad for a fully-featured system. But I'm thinking of just serial I/O.)


You need a couple of OSBYTES to let BASIC know the RAM size... Then read/write character (OSRDCH, OSWRCH) and OSWORD 0 - Read a line of text (with optional editing).

That'll get you going - until you hit a syntax error then you need a BRK handler that will indirect to the handler that BASIC supplies, or want to ESCape (same as Ctrl-C in other systems) from an infinite loop...

That will get you a long way... but after that, I found I just wanted more... so a 100Hz timer so that TIME worked, more access to the filing system, VDU support and so on...

For those unaware, Acorn separated the "Language" from the Operating System, so the OS provided everything a language (Basic, Forth, Comal, etc.) might need to run which enabled other languages to be quickly implemented - it also left a full 16KB for the language without it having to worry about including code for trivial stuff like reading a character, line, or opening a file, redefining a character, playing sounds and so on.

There was no machine code monitor as such, just the operating system.

Cheers,

-Gordon

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


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 13, 2022 12:47 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
(Looks like 150 bytes can be freed up in BBC Basic from the file-handling code, which wouldn't be needed in a serial I/O system. And another 100 by dropping INPUT#... more half-baked thoughts posted over on stardot.)


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 01, 2022 3:01 pm 
Offline

Joined: Fri Aug 12, 2022 4:34 pm
Posts: 3
Wow, this is great information!!! Thanks everyone, looks like I've got some reading and homework to do...

In the meantime, can someone clarify something on the schematic for me? What does the blue line mean? Do I connect all of the pins along the same line or does each pin go to its corresponding pin on RAM and ROM? I do have schematic reading experience, but this confuses me.

Once again, thank you all for the great tips and recommendations!


Attachments:
File comment: 6502 Schematic
6502SbcSchematic 1.1.gif
6502SbcSchematic 1.1.gif [ 92.56 KiB | Viewed 1957 times ]
Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 01, 2022 3:31 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
ASPEN32 wrote:
In the meantime, can someone clarify something on the schematic for me? What does the blue line mean? Do I connect all of the pins along the same line or does each pin go to its corresponding pin on RAM and ROM? I do have schematic reading experience, but this confuses me.

A heavier line represents a bus, ie, a whole set of connections. It should be drawn with connections coming out of it diagonally though, as if it were a bundle of wires and wires were coming out of the wrapping. See the very basic whole-computer schematic in the circuit potpourri page of the 6502 primer at http://wilsonminesco.com/6502primer/pot ... ml#BAS_CPU . You can add a UART (or even several) in that one too, with no additional glue logic, per the notes there. I would not use a 6850 though, as it doesn't even have an onboard baud-rate generator. [Edit: I see I mentioned that in an earlier post above, too.]

_________________
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  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 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: