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

All times are UTC




Post new topic Reply to topic  [ 63 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Sat Apr 25, 2020 1:20 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
Other things you could try are: loading a benign address (say, to zero page or the stack page) into the shift register before relinquishing the bus, and holding /RST low for say a dozen clock cycles before beginning the rest of the process.


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 25, 2020 6:09 pm 
Offline

Joined: Fri Jan 25, 2019 2:29 pm
Posts: 193
Location: Madrid, Spain
Chromatix wrote:
Other things you could try are: loading a benign address (say, to zero page or the stack page) into the shift register before relinquishing the bus, and holding /RST low for say a dozen clock cycles before beginning the rest of the process.


Yep, that also crossed my mind. I have plenty of unused IO space that was a perfect choice for this, but just pulling RW up during the handover did the trick.

I had no plans for the weekend anyway... so I put my spare time to good use.

Attachment:
WhatsApp Image 2020-04-25 at 19.57.23.jpeg
WhatsApp Image 2020-04-25 at 19.57.23.jpeg [ 184.86 KiB | Viewed 1397 times ]


I just need a '245 and it's done! If I can't get my hands on one, I may try just bridging it... we'll see.

If anyone is wondering with the LCD stands are out of place on the bottom left corner... the board is so tightly packed up there, that they won't fit. Sames goes for upper left corner. If there's ever a v0.2, that's something to fix.

Time to work on the firmware!


Top
 Profile  
Reply with quote  
PostPosted: Sun Apr 26, 2020 9:39 pm 
Offline

Joined: Fri Jan 25, 2019 2:29 pm
Posts: 193
Location: Madrid, Spain
And one last update for the weekend, and probably for the whole next week.

To overcome the lack of the '245 buffer, I just bridged it, as it should be no issue for the 74HCT6526, and indeed, it works.

I now have a very rudimentary java app that uploads a RAM image to my board. I run a test and I can write the upper 16 KB in around 30 seconds, with perfect accuracy, by the way, no lost or flipped bits.

I've gone only as far as having the 6526 blink a led on it's Port B. This also requires the 6522 to work, as the 6526 RESET is controlled by 6522's PA5. And again, it works.

As you can see everything seemed to be working perfectly for me today, so I thought... why not try? And bang, an old NMOS 6526 is also working, without the need of the buffer :) I'll add it anyway, just to be on the safe side.

What a weekend :)


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 29, 2020 11:11 pm 
Offline

Joined: Fri Jan 25, 2019 2:29 pm
Posts: 193
Location: Madrid, Spain
Attachment:
d12f4048-8cc2-4e83-b8c4-23a9f57dd840.jpg
d12f4048-8cc2-4e83-b8c4-23a9f57dd840.jpg [ 252.45 KiB | Viewed 1345 times ]


Ain't it beautiful? If that poor old 6526 (Datecode 3486) had some self-conscience, it would be feeling preety akward right now. At least, It's only running at 1 MHz.... I won't come as a surprise to anybody, but I was amazed by the heat the 6526 produces at 1 MHz... while the newer parts are just stone cold, even at higher speeds!

Talking about higher speeds...

Attachment:
8070ce8f-888b-47cf-a25a-cce8d3cba7d4.jpg
8070ce8f-888b-47cf-a25a-cce8d3cba7d4.jpg [ 324.74 KiB | Viewed 1345 times ]


That thing on the left if my 74HCT6526 Board 0. Enough to drive the LCD.

I'm very happy with the result. My first SBC ever, and, except for some placement issues, a couple of interchanged signals on the frequency meter, and a missing pull-up resistor... It seems to work exactly as I planned. Also, nice to see the 74HCT6526 running at these speeds, even though B0 is a 14 months old design. If you consider my "career in electronics" started just 20 months ago, that's a lot of time!

I would never have reached this point without the help of this forum, the incredible amount of knowledge stored here is awesome! Thank you all, I hope I can return some of what I've learned.

Cheers!


Top
 Profile  
Reply with quote  
PostPosted: Sat May 02, 2020 11:18 pm 
Offline

Joined: Fri Jan 25, 2019 2:29 pm
Posts: 193
Location: Madrid, Spain
Hi!

Slowly but steady, the firmware for my SBC is taking form.

So far, I have been looking into initializing everything and have a platform where I can work.

I created a separate topic to get some insights into calculating the clock frequency within code. By using TOD clock and some tricks with two software counters, I can pinpoint my clock frequency with 0.1 MHz precision. Good enough :)

With the value I get from the previous calculation, I setup a timed interrupt on 6522's TIMER1 to fire 5 times per second. Right now, this only moves a 80 byte buffer I have in memory to the LCD screen. Not the fastest refresh rate! But again... good enough :)

I just need a few PRINT routines... to move strings to screemRam and convert integers to strings...
Then some minimal input. I have 4 push buttons on the PCB labeled UP, DOWN, OK & CANCEL that should be enough for the purpose of this SCB... and if needed I can expand it, as the full Port B of the 6526 is exposed into a pin header. with something like this would be a nice match.

After that... all work will be focused back on the 74HCT6526.


Top
 Profile  
Reply with quote  
PostPosted: Sun May 10, 2020 3:26 pm 
Offline

Joined: Fri Jan 25, 2019 2:29 pm
Posts: 193
Location: Madrid, Spain
I can now say my first SBC is pretty much completed. Looking back at the list of requirements I put together at the very beginning:

Quote:
  • Continuosly variable clock, from 1MHz to as far as possible. I have an upper limit of 30MHz in mind for the clock. I know 20MHz is possible with a 6502, 30 should be pretty much impossible I think. This variable clock would allow me to find any limits
  • Clock Frequency Display... Useful, and should look very cool.
  • No input at all. Program the ROM (more on this later) and just run a suite of tests for the 6526.
  • Basic output... Something like a 20x4 Character LCD will do.
  • Easy, quick, and onboard ROM programming. I will be modifying the code continuously, so this is very important.
  • Include a 6522. Why not!? It can also be useful for the tests
  • Include a socket for a 6526. Compatibility with old NMOS 6526 is not needed, although it would be nice.
  • Allow testing of all 6526 pins. Ports, serial, /FLAG interrupt, etc
  • Independent reset for 6526.


All of them are fulfilled. I even exceeded in the second one, as the computer has minimal input, in the form of 4 push buttons for basic commands. Having PortB of the 6526 exposed it gives me some expansion capabilities if needed.

The firmware, although very basic, is enough for the testing I want to run. About its speed, if my frequency meter is accurate, it goes up to 17-18 Mhz. Beyond that, the display goes south, oscillating between 20 something and almost 40, so probably it's the clock itself degrading. Everything is rock solid at 14 Mhz, so I'll keep that as my limit for now.

I'm cleaning up my schematics and the Arduino code and I'll be posting them shortly.

Cheers!


Top
 Profile  
Reply with quote  
PostPosted: Mon May 11, 2020 9:12 pm 
Offline

Joined: Fri Jan 25, 2019 2:29 pm
Posts: 193
Location: Madrid, Spain
All files shared here:

https://github.com/dmolinagarcia/SBC6526

- Schematic
- PCB layout
- Arduino code
- Java Programmer
- SBC Firmware

Still in need of some heavy cleanup, but that may take a long time, so I think it's better to share it in its current state.

Cheers!


Last edited by daniMolina on Mon Nov 16, 2020 6:27 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Tue May 12, 2020 8:58 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
> better to share it in its current state

Indeed so, and thanks for doing so!


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 27, 2020 10:36 pm 
Offline

Joined: Fri Jan 25, 2019 2:29 pm
Posts: 193
Location: Madrid, Spain
Hi all.

What begun as a small break... has turned into half a year away from my little projects... But it has been time well spent tinkering with plenty of other things!

I wanted to revisit my SBC6526 (Yup, that is now it's official name) as there were a few things that needed to be fixed.
On the schematic, there were some pull-ups missing, as well as a couple of mixed pins on the clock-meter circuit. Nothing too big, but it's now fixed. I also wanted to completely redo the whole PCB layout. The placement of the LCD was a mess... and this has given me a lot of headaches, with a ton of failed connections everytime I needed to test something new. Blame my soldering skills too, surprisingly, I do fine with SMDs, but soldering a wire to a pcb pad? I always manage to make a mess!!

The biggest change however, is one I've been wanting to do for a lot of time, both for this project, and for the 74HCT6526 (which, same as this, is not abandoned... it's only on a long-term vacation). I've migrated everything to KiCAD. I know some people people are moving away from Eagle, specially due to it's licensing scheme. I must admit I wasn't using a 100% legal version... and I also wanted to do things right. It took some tries to get used to it, and I still think Eagle is more capable than KiCAD, but for my needs, it's more than enough.

I had the schematic posted on the second post of this thread. I've updated that with the new one, which I'm also posting here.

Attachment:
sbc6526.pdf [427.72 KiB]
Downloaded 73 times


My github repository has been updated too with the new version.

The arduino code to program the SBC, and the firmware itself is being reworked right now, and I intend to keep the repo updated.

It's been a lot of work, to arrive at the same place I was before. But even though I'm still a novice here in many aspects, I feel I've been able to apply the things I've learnt along the way. When I compare my work form a year ago to my work now... wow!

Cheers!


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 28, 2020 7:47 am 
Offline
User avatar

Joined: Sun Oct 18, 2015 11:02 pm
Posts: 428
Location: Toronto, ON
Hi Dani,

Welcome back. It’s been nice to see the progress on the 74HCT6526 and your SBC. You mention going back to the 74HCT6526 now. I seem to recall you got it working with a C64. Are you contemplating some enhancements or is there functionality still missing on it?

Cheers,
Drass

_________________
C74-6502 Website: https://c74project.com


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 28, 2020 10:50 am 
Offline

Joined: Fri Jan 25, 2019 2:29 pm
Posts: 193
Location: Madrid, Spain
Drass wrote:
Hi Dani,

Welcome back. It’s been nice to see the progress on the 74HCT6526 and your SBC. You mention going back to the 74HCT6526 now. I seem to recall you got it working with a C64. Are you contemplating some enhancements or is there functionality still missing on it?

Cheers,
Drass


Hi Drass,

Yup, there's still quite a few things missing. TOD, Interrupts, and the Serial Register do not exist yet. I have a pretty much complete design for them, with only some minor quircks left to fix.

Ports are done, with some major improvements on the original version. Still have to order PCBs for them though.

And the timers... those are my biggest headache. They work, I dare to say, perfectly. However, it's like they have a cardiac arrhythmia. Sometimes they skip a tick, quite often, like once every 100-200 cycles. Also, the counters (74163) lose their count from time to time, flipping bits out of order, which, according to their datasheet, is just not possible. So far, I blame this on some timing constraint, of maybe just poor construction. The last board I made, I had to use leadfree solder for the first time in my life, and it didn't go smootly, to say the least.

This all happened back in February. Frustration was overcoming the fun, then, the pandemic came, me and my wife have been working from home since then, and I had to dismantle my humble lab and turn it into an office :lol: .

So that was when I decided to take a break from the project, get some fresh air, and hopefully, make a good comeback sometime later.

I've been closely following your 100MHz TTL 6502 project, very inspiring, truly amazing. After seeing your logisim model, I'm thinking about trying it myself for the 74HCT6526. I feel like I had a few major issues in my designs from the very beginning, and instead of locating and fixing them, I've been adding more ICs on top of it, specially with the timers. I may try to create them from scratch again. Maybe I've learnt some stuff along the way so I can reach for a better solution. Eventually, you will need a 100MHz 6526 to go with that CPU right? :D

Cheers!


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 28, 2020 2:53 pm 
Offline
User avatar

Joined: Sun Oct 18, 2015 11:02 pm
Posts: 428
Location: Toronto, ON
daniMolina wrote:
And the timers... those are my biggest headache. They work, I dare to say, perfectly. However, it's like they have a cardiac arrhythmia. Sometimes they skip a tick, quite often, like once every 100-200 cycles. Also, the counters (74163) lose their count from time to time, flipping bits out of order, which, according to their datasheet, is just not possible. So far, I blame this on some timing constraint, of maybe just poor construction.
It certainly sounds like something slippery is going on. I’d be happy to try to lend a hand when you start digging back into those problems.

Quote:
This all happened back in February. Frustration was overcoming the fun, then, the pandemic came, me and my wife have been working from home since then, and I had to dismantle my humble lab and turn it into an office :lol: .
Yeah, it’s hard to find something that didn’t get derailed by the pandemic.

Quote:
So that was when I decided to take a break from the project, get some fresh air, and hopefully, make a good comeback sometime later.
Very wise I say — banging heads against walls is not a great way to pass what is already a very difficult time for most. But glad to see you back, and looking forward to seeing further progress.

Quote:
Eventually, you will need a 100MHz 6526 to go with that CPU right? :D
You bet! Actually, I’m still quite keen to trying the 74HCT6526 with the C74-6502 someday. It’s a step in the right direction for the C74 project!

_________________
C74-6502 Website: https://c74project.com


Top
 Profile  
Reply with quote  
PostPosted: Sat Dec 05, 2020 12:41 pm 
Offline

Joined: Fri Jan 25, 2019 2:29 pm
Posts: 193
Location: Madrid, Spain
Attachment:
logisim6526.PNG
logisim6526.PNG [ 44.11 KiB | Viewed 981 times ]


And with just some minor tweaks, to account for the lack of a 6522, here it is, my sbc6526 firmware running on logisim, along a very primitive 6526 with just two registers for now.

Actually, As I had the code splitted in a few libraries (CIA, VIA, LCD, ScreenMemory), there are only changes on my main.asm file, for which I now have to separate versions, one for the Physical SBC, one for the Logisim SBC.

Moving to a virtual lab for now!


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 12, 2021 8:30 am 
Offline

Joined: Fri Jan 25, 2019 2:29 pm
Posts: 193
Location: Madrid, Spain
And... almost a year later... I'm back!

Long story short... I finally quit my job, as it was not only stealing all my spare time to dedicate to this project... but was already impacting my personal life, and that's a very big red flag. But, there's a happy ending. I'm at a new place for a month already, and things are looking bright!

Back to the SBC. It took me around 2/3 weeks just to get my last build and code to compile and run again :oops: ... I've took down the github repository for now, as I'm trying to make sense of my own code. I'll put it back online as soon as everything is more clear.

Meanwhile, I've completed a second revision. The main change, as I had enough free IO addresing, I've added space for a 2nd 6526. Right now, I was driving the LCD screen with the one and only 6526 on board. Every thing I tried testing the 6526 ports, the LCD went bananas, and some times there was no way to get it back online. On the v2, the 6522 drives the LCD. The two 6526 aren't driving anything, and their only purpose is to run tests on them. By having two, I plan on having an original 6526 plus a 74HCT6526, in order to be able to run comparisons between the two. Schematics are completed, PCB just needs some tweaks on the tracing, and the order will be placed.

It feels nice to be back :)

Cheers!


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 12, 2021 9:45 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Welcome back!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 63 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 25 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: