Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

In order to dial out, it is necessary to broaden one's dimension.


devel / comp.os.cpm / 6502 Emulator for CP/M

SubjectAuthor
* 6502 Emulator for CP/MNils M Holm
+* Re: 6502 Emulator for CP/Mme
|`- Re: 6502 Emulator for CP/MNils M Holm
+- Re: 6502 Emulator for CP/Mme
`* Re: 6502 Emulator for CP/MFred Weigel
 `- Re: 6502 Emulator for CP/MNils M Holm

1
6502 Emulator for CP/M

<l560pjFf4jnU1@mid.individual.net>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=5323&group=comp.os.cpm#5323

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: nmh@sraddha.invalid (Nils M Holm)
Newsgroups: comp.os.cpm
Subject: 6502 Emulator for CP/M
Date: 10 Mar 2024 15:09:39 GMT
Organization: TARFU
Lines: 10
Sender: Nils M Holm <nmh@sraddha.local>
Message-ID: <l560pjFf4jnU1@mid.individual.net>
X-Trace: individual.net PSHUqo1t+LEc12aN75hI4QleIx2fU5pnz1kqxOCxGJZMZ1IA8L
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:ZWISvCORW/0b/HKen2kPc07NhLA= sha256:E+70P5yOZy3Xx07NuhaYJh/FExwzPUF43n4kHA0QUWk=
User-Agent: tin/2.6.1-20211226 ("Convalmore") (FreeBSD/12.4-RELEASE (amd64))
 by: Nils M Holm - Sun, 10 Mar 2024 15:09 UTC

To offer some content in a hopefully not dead group:

I have written a 6502 simulator for CP/M (and DOS and Unix). With
limited (simulated) RAM, of course, and only about 3000 instructions
per second on a 4MHz Z80, but maybe it is still useful to someone.

Here it is: http://localhost/t3x.org/t3x/0/sim65kit.html

--
Nils M Holm < n m h @ t 3 x . o r g > http://t3x.org

Re: 6502 Emulator for CP/M

<5cc614fe-0077-4bc7-9f92-152f64f09d32@net.net>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=5328&group=comp.os.cpm#5328

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: me@net.net (me)
Newsgroups: comp.os.cpm
Subject: Re: 6502 Emulator for CP/M
Date: Mon, 11 Mar 2024 00:12:40 +0200
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <5cc614fe-0077-4bc7-9f92-152f64f09d32@net.net>
References: <l560pjFf4jnU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="2ea7df707175f66c756eeb9a82025f87";
logging-data="3358690"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bsYmgwg7ooqLpgj9jNxxX"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:xbZbvQnqNVMbskSnKGR7M1dZHnw=
Content-Language: en-US
In-Reply-To: <l560pjFf4jnU1@mid.individual.net>
 by: me - Sun, 10 Mar 2024 22:12 UTC

Cool!
Obviously the correct link is: https://t3x.org/t3x/0/sim65kit.html
Congrats for this 25+ years work.
iss

On 3/10/24 17:09, Nils M Holm wrote:
> To offer some content in a hopefully not dead group:
>
> I have written a 6502 simulator for CP/M (and DOS and Unix). With
> limited (simulated) RAM, of course, and only about 3000 instructions
> per second on a 4MHz Z80, but maybe it is still useful to someone.
>
> Here it is: http://localhost/t3x.org/t3x/0/sim65kit.html
>

Re: 6502 Emulator for CP/M

<90102f63-bc6f-4617-af78-112b5a77ec17@net.net>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=5329&group=comp.os.cpm#5329

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: me@net.net (me)
Newsgroups: comp.os.cpm
Subject: Re: 6502 Emulator for CP/M
Date: Mon, 11 Mar 2024 00:14:50 +0200
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <90102f63-bc6f-4617-af78-112b5a77ec17@net.net>
References: <l560pjFf4jnU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="2ea7df707175f66c756eeb9a82025f87";
logging-data="3358690"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19nWjrgATCxeqip4XQVF5so"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:MFkbyg5DmAkKbGm+hKJIaeg3aW0=
In-Reply-To: <l560pjFf4jnU1@mid.individual.net>
Content-Language: en-US
 by: me - Sun, 10 Mar 2024 22:14 UTC

Cool!
Obviously the correct link is: https://t3x.org/t3x/0/sim65kit.html
Congrats for this 25+ years work.
iss

On 3/10/24 17:09, Nils M Holm wrote:
> To offer some content in a hopefully not dead group:
>
> I have written a 6502 simulator for CP/M (and DOS and Unix). With
> limited (simulated) RAM, of course, and only about 3000 instructions
> per second on a 4MHz Z80, but maybe it is still useful to someone.
>
> Here it is: http://localhost/t3x.org/t3x/0/sim65kit.html
>

Re: 6502 Emulator for CP/M

<l580ulFof4hU1@mid.individual.net>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=5341&group=comp.os.cpm#5341

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: nmh@sraddha.invalid (Nils M Holm)
Newsgroups: comp.os.cpm
Subject: Re: 6502 Emulator for CP/M
Date: 11 Mar 2024 09:24:37 GMT
Organization: TARFU
Lines: 26
Sender: Nils M Holm <nmh@sraddha.local>
Message-ID: <l580ulFof4hU1@mid.individual.net>
References: <l560pjFf4jnU1@mid.individual.net> <5cc614fe-0077-4bc7-9f92-152f64f09d32@net.net>
X-Trace: individual.net liMk3jJjNRMiXx0yrGEUoQh+eXw/TiuoG50ag9xdgAFdwgaTL5
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:17rorJvDwo+3tYoqwTE/To2kn6I= sha256:XEZfUfVU8pbFi9t/fftbYHexIUKuQ3V5agO7XUTHzmI=
User-Agent: tin/2.6.1-20211226 ("Convalmore") (FreeBSD/12.4-RELEASE (amd64))
 by: Nils M Holm - Mon, 11 Mar 2024 09:24 UTC

me <me@net.net> wrote:
> Cool!
> Obviously the correct link is: https://t3x.org/t3x/0/sim65kit.html
> Congrats for this 25+ years work.
> iss

Thanks! And, yeah, this is the correct link. Oops!

Did not work on it all the time, though, just picked it up again
and again. Most recently when I got a KIM Uno:

http://t3x.org/kimuno/case.html

> On 3/10/24 17:09, Nils M Holm wrote:
>> To offer some content in a hopefully not dead group:
>>
>> I have written a 6502 simulator for CP/M (and DOS and Unix). With
>> limited (simulated) RAM, of course, and only about 3000 instructions
>> per second on a 4MHz Z80, but maybe it is still useful to someone.
>>
>> Here it is: http://localhost/t3x.org/t3x/0/sim65kit.html
>>
>

--
Nils M Holm < n m h @ t 3 x . o r g > http://t3x.org

Re: 6502 Emulator for CP/M

<ut4brk$2uetk$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=5345&group=comp.os.cpm#5345

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: fred_weigel@hotmail.com (Fred Weigel)
Newsgroups: comp.os.cpm
Subject: Re: 6502 Emulator for CP/M
Date: Sat, 16 Mar 2024 14:54:44 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <ut4brk$2uetk$1@dont-email.me>
References: <l560pjFf4jnU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 16 Mar 2024 14:54:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7f0356a5671f2b56c507f431ff9217a3";
logging-data="3095476"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19tEVggzyYCD1nCf01xTRiZaqq/QYYxVBo="
User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git)
Cancel-Lock: sha1:KZGvLd9IquCRhceAuHon7hiXWu0=
 by: Fred Weigel - Sat, 16 Mar 2024 14:54 UTC

Nils

Not a dead grou!

Speed is interesting... Without looking at your code, I'll propose a
design. There is (almost) 1:1 correspondence in instructions.

Consider not emulating, but translating. I'm thinking on this -- and my
"first cut" has 1 6502 to 3 8080. As there are only 1 byte opcodes in
6502, max 256 entry dispatch table - so, ldax d, inx d, lxi h,t, mov c,a,
mvi b,0 dad b, dad d, mov a,m, inx h, mov h,m, mov l,a, pchl, 3
instructions, jmp dispatch. a bit more overhead, so 20 instructions per.
At 4Mhz, we expect around 20,000 6502 instructions per second.

If we remove the dipatch loop (for sequences of code with no branch we
could achieve 4 times that. Yes, dispatch dominates. But, unfortunately we
do not have the memory to keep track of instructions counts. If I were
doing this in an emulator this would be easy. Doing it ON the hardware
will be tricky. Flags only need proper calculation on certain events --
looking at them and branching. We can go "back in time" to the previous
instruction if needed. Slows us down a bit (we will need to store the
last instruction location).

I think I am going to play with this a while -- before looking at you
code. On the backburner.

And I am sorry -- interesting idea. Rambling a bit.

-Fred
On 10 Mar 2024 15:09:39 GMT, Nils M Holm wrote:

> To offer some content in a hopefully not dead group:
>
> I have written a 6502 simulator for CP/M (and DOS and Unix). With
> limited (simulated) RAM, of course, and only about 3000 instructions per
> second on a 4MHz Z80, but maybe it is still useful to someone.
>
> Here it is: http://localhost/t3x.org/t3x/0/sim65kit.html

Re: 6502 Emulator for CP/M

<l5t7ecF15beU1@mid.individual.net>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=5346&group=comp.os.cpm#5346

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: nmh@sraddha.invalid (Nils M Holm)
Newsgroups: comp.os.cpm
Subject: Re: 6502 Emulator for CP/M
Date: 19 Mar 2024 10:24:12 GMT
Organization: TARFU
Lines: 45
Sender: Nils M Holm <nmh@sraddha.local>
Message-ID: <l5t7ecF15beU1@mid.individual.net>
References: <l560pjFf4jnU1@mid.individual.net> <ut4brk$2uetk$1@dont-email.me>
X-Trace: individual.net E2OTGRF/wSdguQ3DlscgbgjVNrnhRFSKn+q7wy3OYzOwBhD/3U
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:H0wnrYv8k+Re7bDP9wu3Ps4580Q= sha256:cpagzAokdw9xgbKrLpqlsd1Ej7NcqKptkil2S7Mth5c=
User-Agent: tin/2.6.1-20211226 ("Convalmore") (FreeBSD/12.4-RELEASE (amd64))
 by: Nils M Holm - Tue, 19 Mar 2024 10:24 UTC

Fred Weigel <fred_weigel@hotmail.com> wrote:
> Speed is interesting... Without looking at your code, I'll propose a
> design. There is (almost) 1:1 correspondence in instructions.

This is very interesting, but the approach is completely different from
mine. The code in SIM65KIT tries to be easy to understand rather than
clever, let alone optimal. Over the years the programs I am writing
have become more and more simple and obvious. Why would I make things
more difficult than they need to be?

> Consider not emulating, but translating. I'm thinking on this -- and my
> "first cut" has 1 6502 to 3 8080. As there are only 1 byte opcodes in
> 6502, max 256 entry dispatch table - so, ldax d, inx d, lxi h,t, mov c,a,
> mvi b,0 dad b, dad d, mov a,m, inx h, mov h,m, mov l,a, pchl, 3
> instructions, jmp dispatch. a bit more overhead, so 20 instructions per.
> At 4Mhz, we expect around 20,000 6502 instructions per second.
>
> If we remove the dipatch loop (for sequences of code with no branch we
> could achieve 4 times that. Yes, dispatch dominates. But, unfortunately we
> do not have the memory to keep track of instructions counts. If I were
> doing this in an emulator this would be easy. Doing it ON the hardware
> will be tricky. Flags only need proper calculation on certain events --
> looking at them and branching. We can go "back in time" to the previous
> instruction if needed. Slows us down a bit (we will need to store the
> last instruction location).
>
> I think I am going to play with this a while -- before looking at you
> code. On the backburner.
>
> And I am sorry -- interesting idea. Rambling a bit.
>
> -Fred
> On 10 Mar 2024 15:09:39 GMT, Nils M Holm wrote:
>
>> To offer some content in a hopefully not dead group:
>>
>> I have written a 6502 simulator for CP/M (and DOS and Unix). With
>> limited (simulated) RAM, of course, and only about 3000 instructions per
>> second on a 4MHz Z80, but maybe it is still useful to someone.
>>
>> Here it is: http://localhost/t3x.org/t3x/0/sim65kit.html
>

--
Nils M Holm < n m h @ t 3 x . o r g > http://t3x.org

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor