PC6502 - Yet another 6502 based computer project
PC6502 - Yet another 6502 based computer project
So I've been building my own 65C02 based computer;
I've always kind of liked the PC104 formfactor (it just looks cute to me), so I decided to go with that, each board is 100mm by 100mm and uses 64 pin stacking headers.
Pictures below, From bottom to top the PCBs are;
Power supply PCB – This gives me up to 15W from USB-PD or if you used an external 9V-36V DC power supply you can have up to 50W (more on why later)
The 6502 CPU Card – The 6502 (currently running at 10MHz), ROM, RAM and USB C serial port for console
The FM Speech card – The has an OPL3 FM engine on board (YMF262) and an allophone speech synth chip (SP0256-AL2).
The Storage card – this gives 8 bit access to Compact flash cards
Dual SPI card – this is taken from Dayrl’s 65SPI2 project All I’ve done is pop two of these on the PCB and add some address decoding.
65C22 VIA card – a simple 65C22 based VIA card, allowing 2 ports of 8 bit input or output (or any mix).
Apple II slot card – This provides two apple II style slots (but not all of the power rails, and a different address)
In the top is a a T2A2 transputer adapter card fro, Geekdot.com and this is why having higher power is essential. Each TRAM (Transputer module) needs about 800mA, I plan to have 4 TRAMs.
There's a video here of the allophone and FM card doing some basic stuff (the FM is just playing a single note at the end).
https://files.mastodon.social/media_att ... c28a27.mp4
PCBs, CPLD code and basic test code are all in my repository - https://github.com/TechPaula/PC6502/
I've got a keyboard interface PCB coming and keyboard PCB.
I do plan to add a simple SPI driven display from BuyDisplay to show graphics and I mostly want to get back into playing with fractals and raytracing like I did as a teenager.
I would love to figure out how to port BBC basic to this as I'm currently using OSI basic and I really miss being able to use hex. But I don't think I have the skills to port that.
EhBasic would be good to port, but again, I'm not sure how "do-able" that is.
I've always kind of liked the PC104 formfactor (it just looks cute to me), so I decided to go with that, each board is 100mm by 100mm and uses 64 pin stacking headers.
Pictures below, From bottom to top the PCBs are;
Power supply PCB – This gives me up to 15W from USB-PD or if you used an external 9V-36V DC power supply you can have up to 50W (more on why later)
The 6502 CPU Card – The 6502 (currently running at 10MHz), ROM, RAM and USB C serial port for console
The FM Speech card – The has an OPL3 FM engine on board (YMF262) and an allophone speech synth chip (SP0256-AL2).
The Storage card – this gives 8 bit access to Compact flash cards
Dual SPI card – this is taken from Dayrl’s 65SPI2 project All I’ve done is pop two of these on the PCB and add some address decoding.
65C22 VIA card – a simple 65C22 based VIA card, allowing 2 ports of 8 bit input or output (or any mix).
Apple II slot card – This provides two apple II style slots (but not all of the power rails, and a different address)
In the top is a a T2A2 transputer adapter card fro, Geekdot.com and this is why having higher power is essential. Each TRAM (Transputer module) needs about 800mA, I plan to have 4 TRAMs.
There's a video here of the allophone and FM card doing some basic stuff (the FM is just playing a single note at the end).
https://files.mastodon.social/media_att ... c28a27.mp4
PCBs, CPLD code and basic test code are all in my repository - https://github.com/TechPaula/PC6502/
I've got a keyboard interface PCB coming and keyboard PCB.
I do plan to add a simple SPI driven display from BuyDisplay to show graphics and I mostly want to get back into playing with fractals and raytracing like I did as a teenager.
I would love to figure out how to port BBC basic to this as I'm currently using OSI basic and I really miss being able to use hex. But I don't think I have the skills to port that.
EhBasic would be good to port, but again, I'm not sure how "do-able" that is.
Re: PC6502 - Yet another 6502 based computer project
Excellent! It would be great to see BBC Basic on this. I think for most Basics, hooking up to your serial I/O doesn't take very much code or complexity, and gets you a lot of the way there.
It's also possible to run Acorn's VDU protocol over that serial out, all you need is a suitable interpreter on the laptop/desktop end.
But supporting SOUND will start to get more complicated, if you choose to do that. (On the other hand, MS Basic and EhBasic don't need or use anything other than the serial I/O, as far as I know.)
It's also possible to run Acorn's VDU protocol over that serial out, all you need is a suitable interpreter on the laptop/desktop end.
But supporting SOUND will start to get more complicated, if you choose to do that. (On the other hand, MS Basic and EhBasic don't need or use anything other than the serial I/O, as far as I know.)
Re: PC6502 - Yet another 6502 based computer project
PaulaM wrote:
I would love to figure out how to port BBC basic to this as I'm currently using OSI basic and I really miss being able to use hex. But I don't think I have the skills to port that.
EhBasic would be good to port, but again, I'm not sure how "do-able" that is.
EhBasic would be good to port, but again, I'm not sure how "do-able" that is.
All you need is some sort of character IO - putchar and getchar. Optionally a "is a char there" sort of function too so that you can detect Ctrl-C.
So as long as you have a little monitor that can do that, the EhBasic is GO. Actually, since you already have OSI Basic going, then EhBasic will work too. Get the 65C02 version from: viewtopic.php?f=5&t=5760
Getting BBC Basic going may be more challenge - mostly because you need not only a little operating system to mimic the OS calls (and you can start with just the bare minimum) but BBC Basic is itself a 16KB image. So if you can re-assemble it from source and place it at e.g. $6000 through $9FFF (You'll need more RAM!) then it would work. There are some guides online - e.g. https://mdfs.net/Software/BBCBasic/6502/ and I think some folks have made a minimal MOS to support it.
Alternatively, what I did was to move IO up to $FExx then I had a memory map more like the Beeb, so I could load the BBC Basic image into $8000 where it would normally be on a Beeb. I ended up writing a fairly fully compatible OS for my 65C02 systems that lets me run BBC Basic and a few other Acornsoft ROMs, complete with filing system and hooks to make graphics work, etc. (Graphics relies on external support, but the text stuff can be made to work on any old serial terminal - e.g. minicom under Linux, etc.)
Not convinced on the Transputer front though - it would take more than a few to beat a 1Ghz PC these days, then there's the code complexity. (I did a lot of transputer stuff 'way back')...
I do like the stacking idea though!
Cheers,
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Re: PC6502 - Yet another 6502 based computer project
Hi Paula and welcome,
Looking at your CF card (I'm having problems with that myself) you seem to have a 52 pin socket where I would have expected 50 pins, and that seems to break the numbering (you have the same numbers for pins 26 and up as the 50 pin sockets, which doesn't feel right).
A glitch, or am I missing something obvious?
Neil
Looking at your CF card (I'm having problems with that myself) you seem to have a 52 pin socket where I would have expected 50 pins, and that seems to break the numbering (you have the same numbers for pins 26 and up as the 50 pin sockets, which doesn't feel right).
A glitch, or am I missing something obvious?
Neil
Re: PC6502 - Yet another 6502 based computer project
Ah yes, the transputer angle - thoroughly interesting, regardless of performance!
Re: PC6502 - Yet another 6502 based computer project
barnacle wrote:
Hi Paula and welcome,
Looking at your CF card (I'm having problems with that myself) you seem to have a 52 pin socket where I would have expected 50 pins, and that seems to break the numbering (you have the same numbers for pins 26 and up as the 50 pin sockets, which doesn't feel right).
A glitch, or am I missing something obvious?
Looking at your CF card (I'm having problems with that myself) you seem to have a 52 pin socket where I would have expected 50 pins, and that seems to break the numbering (you have the same numbers for pins 26 and up as the 50 pin sockets, which doesn't feel right).
A glitch, or am I missing something obvious?
drogon wrote:
EhBasic is easy to port.
All you need is some sort of character IO - putchar and getchar. Optionally a "is a char there" sort of function too so that you can detect Ctrl-C.
So as long as you have a little monitor that can do that, the EhBasic is GO. Actually, since you already have OSI Basic going, then EhBasic will work too. Get the 65C02 version from: viewtopic.php?f=5&t=5760
All you need is some sort of character IO - putchar and getchar. Optionally a "is a char there" sort of function too so that you can detect Ctrl-C.
So as long as you have a little monitor that can do that, the EhBasic is GO. Actually, since you already have OSI Basic going, then EhBasic will work too. Get the 65C02 version from: viewtopic.php?f=5&t=5760
drogon wrote:
Getting BBC Basic going may be more challenge - mostly because you need not only a little operating system to mimic the OS calls (and you can start with just the bare minimum) but BBC Basic is itself a 16KB image. So if you can re-assemble it from source and place it at e.g. $6000 through $9FFF (You'll need more RAM!) then it would work. There are some guides online - e.g. https://mdfs.net/Software/BBCBasic/6502/ and I think some folks have made a minimal MOS to support it.
drogon wrote:
Not convinced on the Transputer front though - it would take more than a few to beat a 1Ghz PC these days, then there's the code complexity. (I did a lot of transputer stuff 'way back')...
drogon wrote:
I do like the stacking idea though!
Re: PC6502 - Yet another 6502 based computer project
PaulaM wrote:
The extra two pins are for the mounting tabs, it was a library I got from Mouser.
Neil
Re: PC6502 - Yet another 6502 based computer project
barnacle wrote:
PaulaM wrote:
The extra two pins are for the mounting tabs, it was a library I got from Mouser.
Neil
one thing to note, the footprint I got from Mouser doesn't work with the mouser part <face palm>, so I do need to modify the board to allow the tabs to be soldered.
Re: PC6502 - Yet another 6502 based computer project
The footprint I knocked up to suit the generic Chinese socket I used. Unfortunately I did this a couple of years ago and only just got around to actually implementing it...
Neil
Neil
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: PC6502 - Yet another 6502 based computer project
barnacle wrote:
Thanks, /me hits self with clue stick 
PaulaM wrote:
the more I look at BBC basic the more the task looks daunting and beyond me, sound/graphics/etc are probably a bit too much for the me to figure out at this stage.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: PC6502 - Yet another 6502 based computer project
(In fact sound and graphics are already not part of BBC Basic - they are part of the operating system, which in the original is another 16k ROM. The keywords within the basic interpreter and the shim to the OS are not much space, I think. As noted above, typically one writes a minimal OS to go with the Basic interpreter. It's possible to subset the Basic a bit to allow space for that OS all within 16k.)
Re: PC6502 - Yet another 6502 based computer project
BigDumbDinosaur wrote:
PaulaM wrote:
the more I look at BBC basic the more the task looks daunting and beyond me, sound/graphics/etc are probably a bit too much for the me to figure out at this stage.
The operating system and the "language" (Application ROM) They are 2 very separate things. The Language ROM resides from $8000 through $BFFF and the OS resides from $C000 through $FFFF minus 2K for hardware IO. Screen memory is mapped from $7FFF downwards, depending on the mode. User ram starts at $0E00 and goes upwards, although application ROMs (Also at $8000) can reserve RAM, so in a typical system with a disk filing system, user RAM (ie. the start of your BASIC program) is $1900.
The MOS takes care of the hardware, leaving the application to communicate with the MOS in simple ways. (A set of JSR calls to fixed locations at $FFxx) This way you can run many different applications/ROMs and none of them need to do their own screen poking, sound fiddling, file handling, etc. the OS takes care of all that - just like an OS should.
You can implement as many or as few of the OS calls as you need to. Applications will only call the calls when they need to - so if you never use any of the audio functions in BBC Basic then it will never call the OS routine to handle it.
The minimum to implement is something like OSWRCH and OSRDCH - write and read a character. These are trivial as everything needs these. There is also OSBYTE - this is 'byte' level commands, so 256 different commands to do "stuff" taking arguments in XY and returning results - usually in XY. The only ones you need to implement are the ones to do with reading the start and end of RAM (IIRC)
Next is OSWORD - this takes a big parameter block, the function is in A and the pointer to the parameter-block is in XY. The only one you need to implement on day 1 is "getline". Read in a line of text with optional editing. On a BBC Micro the OS can use a 2nd cursor you can move about the screen to effect a copy function. In my OS, I have history recall and various line-editing features.
OSWORD is also used for sound - just ignore the functions for that if you like - programs that use sound will stay quiet and as long as you implement a "success" return code then they won't break.
File handling is another set of vectors and again you can ignore them on day 1. Also remember the Beeb can work with cassette tapes so the entry-level file handling really is very small if you want to emulate that - more than enough to load/save programs (BBC Basic has no knowledge of the underlying means used to save/load - it just issues the OS call and the OS handles it to tape, disk, network, ...)
Text and Graphics - that's handled via text output - in the same way you might send chr$(7) to a TTY 33 to make it ring the bell, or chr$(12) to a video terminal to clear the screen, you send the same from a BBC Basic program to make it go Beep or clear the screen. The OS does this for you, not the Basic interpreter, but to make life easy, the Basic interpreter gives you commands like CLS, MOVE(x,y) and so on.
One other thing you need is a BRK handler. Although I think BBC Basic installs it's own - but it means that when a BRK happens the OS has to jump to the installed vector rather than do it's own thing. BRK is used to print error messages in the Acorn world.
Important to remember- this is an OS and not a "monitor".
The same goes for other Acornsoft ROMs - e.g. Comal, Forth, BCPL... Word processors should work too, but some of them break the rules, sadly. I never could get WordWise to run in my system.
This means... If you ran MS Basic under an Acorn compatible OS, you can get that MS Basic to do graphics, draw lines, etc. by having a set of subroutines that emitted the necessary control codes. BBC Basic just makes it easy by having built in commands for them. The OS picks up the codes and does what's needed.
I even extended this in my own board to drive a vt100/ansi compatible terminal, so I can do screen clearing, cursor movement, etc. from BBC Basic to either my smart terminal or a real terminal.
The issue in this system is the memory map - unless you re-assemble BBC Basic from the published sources then you need RAM at $8000 through $BFFF (Yes, it's 16K). The Acorn MOS is 14K but my fairly complete version is just over 10K. (No sound or screen poking)
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Re: PC6502 - Yet another 6502 based computer project
I think for the moment (having looked into it a bit), I'll be going to EhBasic next.
But I will need an EPROM emulator, I found the perfect part (PicoROM) but it's out of stock (or silly money for shipping to the UK), so that may get delayed a little.
I'm planning on using VideoBeast (https://feertech.com/microbeast/videobeast.html) for my graphics when they're available and that has all sorts of magic in.
Nice work on the footprint!!
But I will need an EPROM emulator, I found the perfect part (PicoROM) but it's out of stock (or silly money for shipping to the UK), so that may get delayed a little.
I'm planning on using VideoBeast (https://feertech.com/microbeast/videobeast.html) for my graphics when they're available and that has all sorts of magic in.
Nice work on the footprint!!
-
daniMolina
- Posts: 214
- Joined: 25 Jan 2019
- Location: Madrid, Spain
Re: PC6502 - Yet another 6502 based computer project
Hi!
I like the stacked design. I went for it with my 74HCT6526, but the connector I used were very flimsy and unreliable. That gave me a ton of headaches.
I am planning to restart the project soon, and I think the PC104 form factor is a good choice. Could you point me to the connectors and the size of the vertical spacers you used? Your build looks very robust!
Thanks!
I like the stacked design. I went for it with my 74HCT6526, but the connector I used were very flimsy and unreliable. That gave me a ton of headaches.
I am planning to restart the project soon, and I think the PC104 form factor is a good choice. Could you point me to the connectors and the size of the vertical spacers you used? Your build looks very robust!
Thanks!
Re: PC6502 - Yet another 6502 based computer project
so EhBASIC is now running on it, and I'm planning to juggle the memory map around to give myself more memory.