Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Introduction of a newbee

2 posters

Go down  Message [Page 1 of 1]

1Introduction of a newbee Empty Introduction of a newbee Sun Jun 12, 2022 9:35 pm

Ruud



Hello,

My name is Ruud Baltissen, I'm Dutch and 63 years old. One of my hobbies is tinkering with old computers, mainly Commodores. I also fancy TTL CPUs And I am busy building three: http://www.baltissen.org/newhtm/ttlcpus.htm.
Lately I got a Gigatron as a present from my wife and in the forum I read about someone having built the Gigatron in SimulIDE. And that's how I got here.
I decide to rebuild the smallest one, including some RAM, ROM and I/O, in SimulIDE as well. And I almost immediately found two bugs. So it paid of to try SimulIDE out!

I don't know if I can contribute. First: I mainly program in Pascal and ML. But I can at least contribute an idea. To make a long story: if only normal gates are involved, thus no flipflops, a ROM can be used as GAL.
If somebody already came with this idea, no problem.

With kind regards, Ruud Baltissen

My site

http://www.baltissen.org

2Introduction of a newbee Empty Re: Introduction of a newbee Sun Jun 12, 2022 11:02 pm

arcachofo

arcachofo

One of my hobbies is tinkering with old computers, mainly Commodores.
6502 and family are being implementedin simulide:
https://simulide.forumotion.com/t748-65x-family-of-the-mpus

This is just in it first steps and help is desperately needed.


I don't know if I can contribute.
You can have a look here:
https://simulide.forumotion.com/f13-willing-to-help
https://www.simulide.com/p/contribute.html

But if you can help with 65xx family... that would be the best.
Programming is not needed.
What I need is someone with good knowledge of those chips, I know very little and datasheets are often confusing and/or incomplete.
I also need someone that can test, compare timings with real readings from Oscilloscope or Logic Analizer, etc.


Btw: great intro to your site: http://www.baltissen.org

Btw2: I started to learn programming with a Commodore64.

3Introduction of a newbee Empty Re: Introduction of a newbee Mon Jun 13, 2022 10:55 am

Ruud



arcachofo wrote:6502 and family are being implementedin simulide:
https://simulide.forumotion.com/t748-65x-family-of-the-mpus

The Elektor / Elektuur Junior computer is a simple stand-alone machine that can be simulated by SimulIDE IMHO.
Elektuur Junior

And yes, it is in the dev branch.
And those parts are where to find?

What I need is someone with good knowledge of those chips, I know very little and datasheets are often confusing and/or incomplete.
I'll do my best.

Btw: great intro to your site: http://www.baltissen.org
Thank you!

Btw2: I started to learn programming with a Commodore64.
Have fun! If you need help, email me.

Kind regards, Ruud

http://www.baltissen.org

4Introduction of a newbee Empty Re: Introduction of a newbee Mon Jun 13, 2022 4:42 pm

arcachofo

arcachofo

The Elektor / Elektuur Junior computer is a simple stand-alone machine that can be simulated by SimulIDE IMHO.
Didn't know about that one, simple enought to try it in simulide (eventually).

And those parts are where to find?
Simulide code is in this repository: https://launchpad.net/simulide
Development branch is here: https://bazaar.launchpad.net/~arcachofo/simulide/trunk/changes

In any case I will contact you and provide executables for your OS.


Just to give some context:
These 65xx components are being implemented as a "proof of concept" for an expansion of some capabilities in simulide:

From version 1.0.0 MCUs are configured using xml files, this allows to add new models without recompiling simulide or design "custom" MCUs.
This is done by adding modules and configuring some of it's characteristics.

For example this is TIMER0 in Atmega328:
Code:
  <timer name="TIMER0" type="800" configregsA="TCCR0A" configregsB="TCCR0B"
                       counter="TCNT0"
                       clockpin="PORTD4"
                       interrupt="T0_OVF"
                       prescalers="0,1,8,64,256,1024,EXT_F,EXT_R"
                       prselect="CS00,CS01,CS02" >
    
    <ocunit name="OC0A" pin="PORTD6" ocreg="OCR0A" bits="COM0A0,COM0A1" interrupt="T0COA" />
    <ocunit name="OC0B" pin="PORTD5" ocreg="OCR0B" bits="COM0B0,COM0B1" interrupt="T0COB" />
  </timer>
But these modules must be implemented in simulide in order to use them.


This system was designed to create Microcontrollers with all perifericals in the same chip.
The goal now is to expand it to be able to create any kind of components: Microprocerssors, I/O chips, communication chips, etc.

For this we need to modify the current implementation to make it more generic, and add "scripting" capabilities.
Adding scripts on top of modules will allow to create any kind of components in simulide.

I'm currently working in all these changes and I'm using 6502, 6520, 6522 as "goals" to see what is needed and to test how it is working.

- 6502 cpu is implemented in  C++.
The instruction set, some control lines and reset sequence are already (roughtly) done and it is capable of reading instructions from external memory, execute and write to external memory.
All these need to be tested, and timings must be fine tuned.

The debugger is also roughtly working for 6502 asm.


- 652x and other external perifericals will be inplemented as scripts.
I'm currently adding the scripting capabilities and some other things needed, for example interrupts driving control Pins.
Some basic things like reding/writting to registers, setting states and directions of Ports are already working without scripting.


So I will email you and see if we can collaborate and speed up all this stuff.

Have a nice day.

5Introduction of a newbee Empty Re: Introduction of a newbee Wed Jun 15, 2022 9:16 pm

Ruud



arcachofo wrote:- 6502 cpu is implemented in  C++.
.....
- 652x and other external perifericals will be inplemented as scripts.
Due to my TTL CPU projects, the various Commodores etc. I'm very familiar with the 6502. I don't program in C++ but I'm familiar enough with it to be able to understand what I read. I had a look at the links you gave me but, if it should be there, I have missed it. So if you give me a pointer to the code, I will certainly have a look at it.

I'm very familiar with the 6522 but more on user level: see it as a taxi driver who knows how to drive its car but doesn't need to know all ins and outs of the engine. Of course I like to see its script as well.

Why the 6502 in C++ and the 6522 as a script? As a programmer I understand using C++ but have no real idea how a script can do the same trick. Will the 6502 be scripted as well in the future?

No scope and no logic analyzer. Most of the time I relied on my debugger for the 6502 and a similar for the PC. (To be tested yet: new one for the PC). What also helped very much: using EEPROMs instead of EPROMs.

What I can do for the moment to build the Junior in SimulIDE. I'll add my single-step circuit to it so things can be tested at 1 MHz.

One thing: I have a busy job and a family. The last simply means I can spend all my free time to my hobbies. But I'll do my best Smile

Kind regards, Ruud

http://www.baltissen.org

6Introduction of a newbee Empty Re: Introduction of a newbee Wed Jun 15, 2022 11:41 pm

arcachofo

arcachofo

The links avobe are to a Bazaar repository, there are several branches.
To get the code in your computer you need to install Bazaar and get a copy with this command:
bzr branch lp:simulide

You can also browse the code online:
https://bazaar.launchpad.net/~arcachofo/simulide/trunk/files

But 6502 is implemented using the existing "infrastucture" to create MCUs, so the functionality is spread in many files.
The "core" whith the instruction fetching/decoding/executing is here:
https://bazaar.launchpad.net/~arcachofo/simulide/trunk/view/head:/src/mcusim/cores/mcs65/mcs65core.cpp


Why the 6502 in C++ and the 6522 as a script? As a programmer I understand using C++ but have no real idea how a script can do the same trick. Will the 6502 be scripted as well in the future?
6505 is much more complex and cpu intensive, so it's worth doing it in C++.
Using scripts allows to add/modify components without recompiling simulide, but it's slower in execution.

This way of creating components using scripts is still in development, indeed is just starting, still needs a lot of work.
Implementing 6522 with scripts is a way to develop this "scripting method" with a real case.
Indeed I'm starting with 6520 which is much simpler.

What I can do for the moment to build the Junior in SimulIDE. I'll add my single-step circuit to it so things can be tested at 1 MHz.
Ok, but this is not yet in an state to test such circuits.
There are dozens of things to solve and it is still tricky to work with it.

For example running the cpu from external clock was recently implemented, and I think it is not yet added to 6502.

All the proccess to fetch/decode/execute instructions roughly works, but some intructions don't work yet.

The "MCU Monitor" can show some information, but it  needs to be adapted to 6502, 6522 and others.

I'm also working to get the debugger running with 6502, it is already roughly kindoff working, but there are many details to solve:



So there is still a long way to go, but you can get used to simulide and any circuits you do will be useful to do some testing (hopefully) soon.

I will let you know the state of development as it advances.

7Introduction of a newbee Empty Re: Introduction of a newbee Tue Jun 21, 2022 5:25 pm

Ruud



[quote="Ruud"]
arcachofo wrote:What I can do for the moment to build the Junior in SimulIDE. I'll add my single-step circuit to it so things can be tested at 1 MHz.
Sorry for the late reply but other things had priority. I wanted to implement the Junior in SimulIDE and... bummer, the Junior has a 6532 on board. The only thing I can possibly do for the moment is to create the 6532 in separate components. "Possibly" because I have to emulate the timer in one or another way.

Kind regards, Ruud

http://www.baltissen.org

8Introduction of a newbee Empty Re: Introduction of a newbee Wed Jun 22, 2022 4:45 am

arcachofo

arcachofo

The only thing I can possibly do for the moment is to create the 6532 in separate components. "Possibly" because I have to emulate the timer in one or another way.
Implementing it with discrete components would be really complex and the simulation terribly slow.
Note that any simulation with 6502 and a few components at 1Mhz will not run at real time,  (usually less than 25%).
With 6532 implemented in discrete components speed can go down 1 order of magnitude.

You could "easily" create a 6532 with basic IO functionality in xml files.
The timer can be done with an script, but scripted timers are not implemented yet.

To add 6532 to simulide you just need to create a file similar to 6522.mcu (copy/paste and modify), create a package describing the pins (you can do in the GUI) and add an entry to the list of components for 6500 family.

I created the files needed (attached to this post), so you can download and:
- Unzip 652x.zip and move those files to: simulide/data/MCS65/652x/ folder.
- Edit this file: simulide/data/mcs65.xml and add an entry for 6532, so it looks like this:
Code:
<!DOCTYPE SimulIDE>

<itemlib>
    <itemset category="MCS65" type="MCU" >
        
        <item name="6502" package="MCS65/6502/6502" data="MCS65/6502/6502"></item>
        <item name="6520" package="MCS65/652x/6520" data="MCS65/652x/6520"></item>
        <item name="6522" package="MCS65/652x/6522" data="MCS65/652x/6522"></item>
        <item name="6532" package="MCS65/652x/6532" data="MCS65/652x/6532"></item>
    
    </itemset>
</itemlib>


Then, next time you open simulide you will have a 6532 to add to the circuit.
It does not have Timer or interrupts (could be added later), but you can create your circuit and do some basic testing:

Introduction of a newbee 653210


In any case, the first thing to do is testing 6502 Instructions.
When all instructuctions are working correctly we can move to next thing.
Attachments
Introduction of a newbee Attachment652x.zip
You don't have permission to download attachments.
(2 Kb) Downloaded 0 times

9Introduction of a newbee Empty Re: Introduction of a newbee Wed Jun 22, 2022 5:27 pm

Ruud



Thank you!

http://www.baltissen.org

10Introduction of a newbee Empty Re: Introduction of a newbee Sun Jul 03, 2022 8:09 am

Ruud



Just FYI: I son bought his first house and lot of things have to be done yet. So all my computer activities are on a minimal level.

http://www.baltissen.org

11Introduction of a newbee Empty Re: Introduction of a newbee Sun Jul 03, 2022 9:09 am

arcachofo

arcachofo

Thanks for coming and leaving a comment.

But don't worry, there are many things to do here and by now this doesn't have high priority.
And congrats to your son!

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum