Recent

Author Topic: CPU simulators  (Read 655 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 2427
CPU simulators
« on: February 25, 2021, 08:19:27 pm »
I was just wondering the other evening how much work would be involved in modifying the Escape DLX simulator that Jonas et al. contributed a few years ago for RISC-V. https://github.com/jmaebe/ESCAPE

Has anybody come across https://bohr.wlu.ca/nznotinas/cp464/simulators/VSIM%20(2.0)%20CR.pdf ? It appears to be a multi-CPU emulator written using Delphi in the Win-32 era.

MarkMLl

« Last Edit: February 25, 2021, 09:55:40 pm by MarkMLl »
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

jamie

  • Hero Member
  • *****
  • Posts: 4374
Re: CPU simulators
« Reply #1 on: February 25, 2021, 10:55:58 pm »
I was involved once with one of the many C-64 emulators that were made out there years ago..

We wrote the 6510/6502 CPU processor part of it and helped map out the hardware video etc..

Also took part in doing turbo loading from the 1541 drives.

This was for the Amiga done in ASM and C language
---

 Before I did that I wrote a Assembler IDE started with a machine language monitor plug in and a note book with patched calls after calls after calls into the kernel and then when it got good enough to compile itself, I fixed all of that and cleaned it up..

 Then we moved on to the C128/ Amiga etc..

Things sure have changed, Bloat bloat and more bloat!
The only true wisdom is knowing you know nothing

Edson

  • Hero Member
  • *****
  • Posts: 1139
Re: CPU simulators
« Reply #2 on: February 25, 2021, 11:08:25 pm »
I have included a device simulator for PIC microcontrollers in my compiler PicPas: https://github.com/t-edson/PicPas

It models most of the CPU hardware for several devices and use it to target the compiled code.


Lazarus 2.0.10 - FPC 3.2.0 - x86_64-win64 on Windows 8

jamie

  • Hero Member
  • *****
  • Posts: 4374
Re: CPU simulators
« Reply #3 on: February 25, 2021, 11:30:41 pm »
Will that app compile and down load to the device via a Pick2/3 to a 12x series PIC ?
The only true wisdom is knowing you know nothing

Edson

  • Hero Member
  • *****
  • Posts: 1139
Re: CPU simulators
« Reply #4 on: February 26, 2021, 03:48:04 am »
Will that app compile and down load to the device via a Pick2/3 to a 12x series PIC ?

The PicPas compiler generates the *.hex output files. I think it can work with any Pickit.

The compiler can target to some PIC12F devices: PIC12F508, PIC12F509, PIC12F510 and PIC12F519 .
Lazarus 2.0.10 - FPC 3.2.0 - x86_64-win64 on Windows 8

MathMan

  • Full Member
  • ***
  • Posts: 217
Re: CPU simulators
« Reply #5 on: February 26, 2021, 12:22:09 pm »
I was just wondering the other evening how much work would be involved in modifying the Escape DLX simulator that Jonas et al. contributed a few years ago for RISC-V. https://github.com/jmaebe/ESCAPE

Has anybody come across https://bohr.wlu.ca/nznotinas/cp464/simulators/VSIM%20(2.0)%20CR.pdf ? It appears to be a multi-CPU emulator written using Delphi in the Win-32 era.

MarkMLl

A quite broad question here, so pls forgive that I can not answer in detail. I think the approach depends a bit on what you would like to get as a simulator

* something that could help estimate execution times, or
* a nifty WebUI enhanced tool with a lot of fancy bells & whistles attached

In general both - ESCAPE & VSIM - are quite old, so from my perspective their main advantage seems to be that they are Pascal-based. However CPU tech has advanced tremenduously and beefing one of the above up to handle RISC-V will be a major task, I am quite sure. From the little reading I did on both I would give you better chances on VSIM, as it seems to be prepared for multi-core designs already.

The alternative could be to translate existing top notch simulators to Pascal - e.g. SPIKE - https://github.com/riscv/riscv-isa-sim which seems to be well maintained.

MathMan

MarkMLl

  • Hero Member
  • *****
  • Posts: 2427
Re: CPU simulators
« Reply #6 on: February 26, 2021, 12:31:43 pm »
Do you know whether the VSIM sources have ever been made available? I'm interested in exploring a particular robustness detail based on lessons that I think everybody's learnt from the Intel architecture, and I'd rather not have a language with which I'm less than 100% familiar stand in the way.

Notwithstanding Fabrice Bellard's reputation, it's disturbing to see the number of people that think Javascript is good for this sort of thing.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MathMan

  • Full Member
  • ***
  • Posts: 217
Re: CPU simulators
« Reply #7 on: February 26, 2021, 12:47:52 pm »
Do you know whether the VSIM sources have ever been made available? I'm interested in exploring a particular robustness detail based on lessons that I think everybody's learnt from the Intel architecture, and I'd rather not have a language with which I'm less than 100% familiar stand in the way.

Notwithstanding Fabrice Bellard's reputation, it's disturbing to see the number of people that think Javascript is good for this sort of thing.

MarkMLl

Understandable. Only ref to the sources seems to be the indirect way here - https://bohr.wlu.ca/nznotinas/cp464/simulators/. Didn't find any reference to "official" (whatever that means anyway) release.

Forget it - files under link above do not contain source - only EXE and precompiled DLL. Then the only way might be to directly address authors.

BTW - once you have made up your mind on this project, let me know - I might join, looks interesting.

MathMan
« Last Edit: February 26, 2021, 01:06:47 pm by MathMan »

MarkMLl

  • Hero Member
  • *****
  • Posts: 2427
Re: CPU simulators
« Reply #8 on: February 26, 2021, 01:09:10 pm »
Forget it - files under link above do not contain source - only EXE and precompiled DLL. Then the only way might be to directly address authors.

Much my conclusion.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018