CPCWiki forum

General Category => Demos => Topic started by: litwr on 19:31, 24 December 15

Title: a mathematical demo
Post by: litwr on 19:31, 24 December 15
It fast calculates π number with up to 3000 exact digits. It calculates 100 digits during 4.2 seconds.  The fastest known division and multiplication routines are used. Just RUN"PI
To restart demo type RUN.
See libnew:examples:pi [z88dk] (http://www.z88dk.org/wiki/doku.php?id=libnew:examples:pi) for details on algorithm.
This demo is released for the several other platforms too.  For example, Commodore 64 with blank screen makes 100 digits for 5.8 seconds.
BTW A merry Xmas to all!  ;)
Title: Re: a mathematical demo
Post by: litwr on 20:31, 05 January 16
I've just add several improvements.  The ultrafast division was used.  I am going to publish its algorithm soon.  The results are surprising.  Look at the timings for 800 digits calculation.
Amstrad is slightly slower than C128 for 100 digits because its text output is slower.   However for the bigger numbers it is faster.
If somebody wants to check Commodore version of this program then use the link - a mathematical demo - Commodore 64 (C64) Forum (http://www.lemon64.com/forum/viewtopic.php?p=709114#709114).
Title: Re: a mathematical demo
Post by: Executioner on 23:39, 05 January 16
Quote from: litwr on 20:31, 05 January 16
The results are surprising.

Not that surprising. Everyone always harps on about how much faster a 6502 is than a Z80, but in reality a Z80 at 4MHz is the same speed or faster for simple instructions as a 6502 at 1MHz, and the 6502 lacks a lot of the functionality of the Z80, including 16 bit maths.
Title: Re: a mathematical demo
Post by: MacDeath on 22:19, 06 January 16
can some arithMathic co-processor for Z80 be added on a CPC ? do they even exist for Z80 ?

yeah 4mhz Z80 is supposed to be better at Math than 1mhz 6502... but less good on basic instructions to other components... from what I was told, is this even true ?



incredible, the BBC computer wins the benchmark on BBC channel.
;D

Title: Re: a mathematical demo
Post by: TotO on 22:46, 06 January 16
Sure, you can interface an AMD FPU (AM9511/12) with the Z80 by using I/O (slow) or DMA.
But... I'm not really sure that will be interresting today.
Title: Re: a mathematical demo
Post by: andycadley on 23:06, 06 January 16
Quote from: MacDeath on 22:19, 06 January 16
incredible, the BBC computer wins the benchmark on BBC channel.
Haha, I love how completely arbitrary the scoring in that is. The BBC does have a very good BASIC implementation though and it's 2MHz 6502 is certainly no slouch. Can't say I'm surprised the QL lost though, I'm amazed that had one that actually worked! During the unboxing bit, I was sure they were going to mention a box you had to plug permanently onto the expansion port to actually get the machine to run, I guess it must've been a slightly later revision.
Title: Re: a mathematical demo
Post by: HAL6128 on 23:34, 06 January 16
Quote from: TotO on 22:46, 06 January 16
Sure, you can interface an AMD FPU (AM9511/12) with the Z80 by using I/O (slow) or DMA.
But... I'm not really sure that will be interresting today.
Isn't it possible to use the MiniBooster / CPC Booster as some kind of Co-Processor with the help of its additional AMTEL /  AVR Risc Processor?
Title: Re: a mathematical demo
Post by: TotO on 07:47, 07 January 16
Sure. But, in a same way, using i/o ports should make the fast computing result slow down by the data exchanges.
Title: Re: a mathematical demo
Post by: alex76gr on 08:56, 07 January 16
Thank you so much for this.
Maybe your program will become the standard cross-platform benchmark that will end the dispute of which CPU is faster.
Title: Re: a mathematical demo
Post by: HAL6128 on 10:59, 07 January 16
Quote from: TotO on 07:47, 07 January 16
Sure. But, in a same way, using i/o ports should make the fast computing result slow down by the data exchanges.
Then it only make sense to use the Booster for a huge set of calculation at once when no data exchange takes place and the end result will be exchange. Just for curiosity. The old CPCBooster+ has a small RAM space available for own code. Is it the same with the MiniBooster?
Would it be possible to use the "PI calculating program" above, let the MiniBooster calculate and transfer the result (only the figures) to the CPC?
Title: Re: a mathematical demo
Post by: TFM on 17:34, 07 January 16
You can use AVRstudio to add functionality to the Booster.  :)
Title: Re: a mathematical demo
Post by: TotO on 17:44, 07 January 16
It is the same ATMega. So, the same RAM but the usage and functions are not exactly the same.
By the way, if you only need to return PI, it should be better to store it into your code and not compute it. :)
Title: Re: a mathematical demo
Post by: Bryce on 21:22, 07 January 16
The BBC uses a Z80 as its second processor, so I think we should use a 6502 as the CPCs second processor :)

Bryce.
Title: Re: a mathematical demo
Post by: TFM on 21:23, 07 January 16
Quote from: Bryce on 21:22, 07 January 16
The BBC uses a Z80 as its second processor, so I think we should use a 6502 as the CPCs second processor :)

Bryce.


Yes for 1541 support!  ;D
Title: Re: a mathematical demo
Post by: Bryce on 21:52, 07 January 16
Quote from: TFM on 21:23, 07 January 16

Yes for 1541 support!  ;D

The 1541 is C64 = 6510 CPU and already has its own CPU inside too.

Bryce.
Title: Re: a mathematical demo
Post by: litwr on 07:15, 08 January 16
It is common to consider 6502:z80 speed ratio as 2.2-2.4:1.  So C128 with ≈1.8 MHz should be close to 3.96-4.32 MHz z80 without wait states.  Amstrad CPC6128 CPU effective frequency is close to 3.2 MHz.  This arithmetic caused my surprise.  However it is also well known that in some important cases the mentioned speed ratio is about 1.5:1.  The most known case of z80 advantage is the memory copy.  The π-demo shows that z80 division is also an example of the high z80 efficiency, the division gives ratio 1.8:1.  IMHO it is possible to write z80 programs with 2:1 ratio but it is very difficult.

I made several improvements to the codes and gather results for 800 digits calculation.

Commodore 64 (PAL) - 212.2
Commodore 64 (NTSC) - 204.3
Commodore 128 (PAL) - 112.6
Amstrad CPC6128 - 115.5
IBM PC 8150 (1981) - 49.5

IBM PC uses Intel 8088 at 4.77 MHz.  This CPU has hardware division and multiplication.  However the version for IBM PC is not so well optimized as versions for z80 or 6502.

I gave number 1 to the current version at http://litwr2.atspace.eu/cpc.html (http://litwr2.atspace.eu/cpc.html)
The program for IBM PC is at http://litwr2.atspace.eu/ibm-5150/ibm-5150.html (http://litwr2.atspace.eu/ibm-5150/ibm-5150.html)

BBC Micro is possibly the fastest 8-bit computer before 1987. The only rival maybe Commodore +4 (PAL).
Title: Re: a mathematical demo
Post by: TFM on 18:44, 08 January 16
Quote from: Bryce on 21:52, 07 January 16
The 1541 is C64 = 6510 CPU and already has its own CPU inside too.

Bryce.


See, you can save all that and just use the mechanics and minor components (RAM is not so much expansive any longer anyway  ;) ).
Title: Re: a mathematical demo
Post by: TFM on 18:49, 08 January 16
Quote from: litwr on 07:15, 08 January 16
Commodore 64 (PAL) - 212.2
Commodore 64 (NTSC) - 204.3
Commodore 128 (PAL) - 112.6
Amstrad CPC6128 - 115.5
IBM PC 8150 (1981) - 49.5

BBC Micro is possibly the fastest 8-bit computer before 1987. The only rival maybe Commodore +4 (PAL).


Would be great if somebody can to the test for them too. But that the pc is twice as fast as the CPC is imho very unexpected, I would have guessed maybe 20%. Also it would be interesting to see if in other cased the Z80 would do better compared to that 8088.


Thanks for doing all the work! Very interesting!  :)
Title: Re: a mathematical demo
Post by: TotO on 19:48, 08 January 16
The 8088 CPU is not a real 8bit CPU... It is a 8086 core stripped into a 8bit package. (like the 68008 VS 68000)
So, I'm not surprised it was fastest by using hardware improved APU.
Title: Re: a mathematical demo
Post by: litwr on 20:00, 09 January 16
Quote from: TFM on 18:49, 08 January 16
Would be great if somebody can to the test for them too. But that the pc is twice as fast as the CPC is imho very unexpected, I would have guessed maybe 20%. Also it would be interesting to see if in other cased the Z80 would do better compared to that 8088.
Thanks for doing all the work! Very interesting!  :)
Thank you very much.  :) I optimized version for 8088 too. So the latest results for IBM PC 5150 are 26.3 seconds for 800 digits.  I also made a version for RT-11 for the big family of PDP-11 computers...
I am completely unfamiliar with BBC Micro architecture.  :( It should be very easy to move the demo to any 6502, z80, ... platform but I need some help.  For example, how to get the timer data?

Title: Re: a mathematical demo
Post by: ZbyniuR on 21:06, 09 January 16
Did you see this?    Search for prime numbers in Basic, here compare CPC and C64:
https://www.youtube.com/watch?v=pxye-RbKFpY (https://www.youtube.com/watch?v=pxye-RbKFpY)

My friends from speccy.pl made more tests:

BBC Master        - 0'25 - here is little bit optimised but I suppose it safe maximum 2 sec.
Amiga Basic   - 0'30
BBC Micro       - 0'47
BBC Electron    - 1'04
Sam Coupe         - 1'14
CPC 6128 (80)    - 1'19  - little bit faster ;)
CPC 464 (40)    - 1'22  -
C128 (80)    - 1'23  - 80 column mode made switch to 2MHz
C64           - 2'15
C+4           - 2'16
C128 (40)       - 2'48
C128 CP/M      - 3'28  - Microsoft Basic
Atari XL/XE    - 3'50 - faster processor than C64 but slower interpreter
MSX1           - 3'53
ZX 48           - 4'08 - terrible slowly :(
ZX 128         - 4'50
TI99/4A       - 5'58 
ZX81         - 13'12
Title: Re: a mathematical demo
Post by: AMSDOS on 00:54, 10 January 16
Quote from: ZbyniuR on 21:06, 09 January 16
Did you see this?    Search for prime numbers in Basic, here compare CPC and C64:
https://www.youtube.com/watch?v=pxye-RbKFpY (https://www.youtube.com/watch?v=pxye-RbKFpY)

My friends from speccy.pl made more tests:

BBC Master        - 0'25 - here is little bit optimised but I suppose it safe maximum 2 sec.
Amiga Basic   - 0'30
BBC Micro       - 0'47
BBC Electron    - 1'04
Sam Coupe         - 1'14
CPC 6128 (80)    - 1'19  - little bit faster ;)
CPC 464 (40)    - 1'22  -
C128 (80)    - 1'23  - 80 column mode made switch to 2MHz
C64           - 2'15
C+4           - 2'16
C128 (40)       - 2'48
C128 CP/M      - 3'28  - Microsoft Basic
Atari XL/XE    - 3'50 - faster processor than C64 but slower interpreter
MSX1           - 3'53
ZX 48           - 4'08 - terrible slowly :(
ZX 128         - 4'50
TI99/4A       - 5'58 
ZX81         - 13'12


I haven't tried it, though the BASIC Prime Number on this early ACU page (http://www.cpcwiki.eu/index.php/File:ACU841011-054.jpg) takes 90 seconds (BASIC 1.0), the Hisoft Pascal counterpart takes 2.5 seconds.
Title: Re: a mathematical demo
Post by: TMR on 12:19, 10 January 16
Quote from: ZbyniuR on 21:06, 09 January 16CPC 6128 (80)    - 1'19  - little bit faster ;)
CPC 464 (40)    - 1'22

i'm assuming that at least some of this difference is down to the PRINT command being faster when it's dealing with one bit per pixel...?

Quote from: ZbyniuR on 21:06, 09 January 16
C64           - 2'15
C+4           - 2'16
C128 (40)       - 2'48

Those numbers really are a surprise; the C128 without fast mode is clocked at the same speed as the C64 give or take (the speed with it enabled should be a bit faster than the 80 column mode because of the bottleneck, but the screen is off) and the 264 series are faster overall, so the meatier versions of Commodore BASIC must be a drag on resources!

Quote from: ZbyniuR on 21:06, 09 January 16ZX81         - 13'12

Ouch...! Have you perchance got a link to the original forum post where these numbers come from ZbyniuR?
Title: Re: a mathematical demo
Post by: andycadley on 15:35, 10 January 16
Quote from: TMR on 12:19, 10 January 16
Ouch...! Have you perchance got a link to the original forum post where these numbers come from ZbyniuR?

I'd bet that's in SLOW mode, where the Z80 is spending most of it's time doing the display output. In FAST mode (with the screen off) it'd probably be closer to the Spectrum as the ROM routines are very similar.
Title: Re: a mathematical demo
Post by: ZbyniuR on 22:02, 10 January 16
I took this numbers from Polish forum about compare many platforms.
Speccy.pl - compare Basic's (http://speccy.pl/forum/index.php/topic,907.msg30331.html#msg30331)
After I put there the same link, some colectors made test on others computers. :)

AMSDOS@ - Aim of this program is to compare speed of BASIC in those computers. So have to be the same on each platform.
But method of the ACU is realy much faster.
Program from film after optimizing is need less than 53 sec to find prime numbers from 2 to 997, and method of ACU after a small amendments does it in 15.6 sec.
Title: Re: a mathematical demo
Post by: litwr on 17:50, 11 January 16
Quote from: ZbyniuR on 21:06, 09 January 16
Did you see this?    Search for prime numbers in Basic, here compare CPC and C64:
https://www.youtube.com/watch?v=pxye-RbKFpY (https://www.youtube.com/watch?v=pxye-RbKFpY)

My friends from speccy.pl made more tests:

BBC Master        - 0'25 - here is little bit optimised but I suppose it safe maximum 2 sec.
Amiga Basic   - 0'30
...
These are tests of Basics - they show mostly the performance of ROM Basic.  They are also a bit superficial, for example, Commodore +4 fast mode (just blank screen for it) gives 50% speed boost. Locomotive Basic is much faster than Commodore...
The π-number calculator is not benchmark - it is namely the mathematical demo - it realized the computation by the fastest known way using all CPU power.  BTW Commodore +4 PAL can make 800 digits of π for only 98 seconds.  It uses the same ML-program as C64 or C128.
Title: Re: a mathematical demo
Post by: Urusergi on 02:08, 12 January 16
Quote from: ZbyniuR on 22:02, 10 January 16But method of the ACU is realy much faster.
Program from film after optimizing is need less than 53 sec to find prime numbers from 2 to 997, and method of ACU after a small amendments does it in 15.6 sec.
Or around ten seconds  ;D
10 DEFINT a-z
20 pri=3:ma=1000
30 DIM sieve(ma+1)
40 ZONE 8
50 PRINT pri-1,
60 WHILE sieve(pri)
70 pri=pri+2
80 WEND
90 FOR i=pri TO ma STEP pri*2
100 sieve(i)=-1
110 NEXT
120 IF pri<ma THEN PRINT pri,:GOTO 60
Title: Re: a mathematical demo
Post by: litwr on 17:20, 12 January 16
IMHO it will be the best to start a new topic "The benchmark of Basics".  I am still curios about some of them, e.g., Warsaw Basic, ... My measurements show that Locomotive Basic interpreter may be even faster that p-code compilers for Commodore.  :o
Title: Re: a mathematical demo
Post by: ZbyniuR on 00:13, 13 January 16
Urusergi - Your way need 7.7sek. Genius!  My small improve take 7.2 (on 6128), and with XD-DOS (FastPrint) only 5.8sec. :)

10 DEFINT a-y:ZONE 8:MODE 2:z=TIME:p=3:m=1000:DIM s(m+1):PRINT 2,
20 WHILE s(p):p=p+2:WEND:FOR i=p TO m STEP p*2:s(i)=-1:NEXT:IF p<m THEN PRINT p,:GOTO 20 ELSE z2=TIME:PRINT(z2-z)/300

Since months I try find time to find and compare the different ways of sorting in Basic.

Is Typhoon is the only compiler for CPC which uses floating point numbers?
Title: Re: a mathematical demo
Post by: AMSDOS on 01:46, 13 January 16
Quote from: ZbyniuR on 00:13, 13 January 16
Is Typhoon is the only compiler for CPC which uses floating point numbers?


I only know Typhoon the Game, so I curious regarding where the Compiler is.


EDIT: Okay I found it, a French BASIC Compiler called Typhon, the page I found it on (http://www.cpcwiki.eu/index.php/Where_to_learn%3F) mentions it after the Laser BASIC Compiler, so I'm presuming their separate programs. The Fabacom (Fast Basic Compiler) (http://www.cpcwiki.eu/index.php/Fabacom_(FAst_BAsic_COMpiler)) also supports Floating Point Numbers.
Title: Re: a mathematical demo
Post by: Urusergi on 22:47, 13 January 16
Quote from: ZbyniuR on 00:13, 13 January 16
Urusergi - Your way need 7.7sek. Genius!  My small improve take 7.2 (on 6128), and with XD-DOS (FastPrint) only 5.8sec. :)

10 DEFINT a-y:ZONE 8:MODE 2:z=TIME:p=3:m=1000:DIM s(m+1):PRINT 2,
20 WHILE s(p):p=p+2:WEND:FOR i=p TO m STEP p*2:s(i)=-1:NEXT:IF p<m THEN PRINT p,:GOTO 20 ELSE z2=TIME:PRINT(z2-z)/300

Since months I try find time to find and compare the different ways of sorting in Basic.
Thanks  :-[ Don´t hesitate to ask me if you need help with that.
Title: Re: a mathematical demo
Post by: litwr on 16:01, 06 March 16
I've just made a few updates - http://litwr2.atspace.eu/pi/pi-spigot-benchmark.html (http://litwr2.atspace.eu/pi/pi-spigot-benchmark.html)
I can't reach C128, CPC6128 with mathematics shows speed of 1.8 MHz 6502... However it is the open project - anybody may try to write a better z80-code.  But beware it will be not easy.  ;)
Title: Re: a mathematical demo
Post by: Fessor on 17:35, 06 March 16
The Benchmarks are "unclean" as they did not take into account how much time is needed to printout a digit.
Computers with a real Text-Mode have a speed advantage about Computers with bitmapped screens and due to this are slower at printing.
Title: Re: a mathematical demo
Post by: Docent on 18:06, 06 March 16
Quote from: litwr on 16:01, 06 March 16
I've just made a few updates - http://litwr2.atspace.eu/pi/pi-spigot-benchmark.html (http://litwr2.atspace.eu/pi/pi-spigot-benchmark.html)
I can't reach C128, CPC6128 with mathematics shows speed of 1.8 MHz 6502... However it is the open project - anybody may try to write a better z80-code.  But beware it will be not easy.  ;)
"mul10000.s" for Amstrad is missing from the archive.

Title: Re: a mathematical demo
Post by: litwr on 19:25, 06 March 16
Quote from: Fessor on 17:35, 06 March 16
The Benchmarks are "unclean" as they did not take into account how much time is needed to printout a digit.
Computers with a real Text-Mode have a speed advantage about Computers with bitmapped screens and due to this are slower at printing.
This is a nature of this combined demo-benchmark.  The screen output time makes difference for 100 digits result but it means very little for 3000 digits calculation.  My point - the program should print the results in the natural for OS way.  For example, PUT CONSOLE OUTPUT TO FILE should continue to work with CP/M.  Console output is very slow at CP/M but it is possible to use other operating systems.
Quote from: Docent on 18:06, 06 March 16
"mul10000.s" for Amstrad is missing from the archive.
I am very sorry.  :(  it is fixed!
Title: Re: a mathematical demo
Post by: litwr on 21:02, 14 May 16
The things are updated - π (http://litwr2.atspace.eu/pi/pi-spigot-benchmark.html)  :D  The z80 code has become a bit faster.  I've added MSX (even turbo R) systems and Commodore 128 in z80 mode.  I thought that MSX maybe faster than Amstrad due to separate video memory but CPC showed 18% better speed.  :)  Commodore 128 is the shame.  How was it possible to do so monstrous, expensive and slow computer in 1985?  :o The number of C128 units sold is bigger than CPC6128's.  :o  This shows that it was kind of manipulation of the customers.  :( However it is a bit curious why z80 programmers lost the opportunity to work with C128.  It is about 90% slower than CP6128 but it has the advanced custom chips.  The VIC's sprites should be much faster than the software sprites.  So C128 games or demos in z80 mode maybe faster than their analogies for CPC... VIC has also very smooth scrolling...
I tried also to make PCW version but it looks almost impossible.  PCW has a good emulator but it is the one only and without debugger. :( I couldn't find a way to use timer under PCW.  There is almost complete absence of the programming documentation for PCW.  It looks like a big oddity for so mass produced computer.  I used PCW during 3 years (1989-1991)... Could anybody provide any help with information about timer?
Title: Re: a mathematical demo
Post by: TMR on 12:54, 15 May 16
Quote from: litwr on 21:02, 14 May 16However it is a bit curious why z80 programmers lost the opportunity to work with C128.  It is about 90% slower than CP6128 but it has the advanced custom chips.  The VIC's sprites should be much faster than the software sprites.  So C128 games or demos in z80 mode maybe faster than their analogies for CPC... VIC has also very smooth scrolling...

When you use the Z80 you don't really get the C128; the MMU gets shut down so it's a 64K machine which in turn takes C128-specific features like double buffered colour RAM off the table, interrupt handling is [ahem] quirky to the point i never got my head around it, the VIC-IIe seems to get royally messed with if commands like LDIR are used during the display and the testbit "features" don't appear to work at all, I/O registers including the colour RAM should be written to with OUT commands rather than directly... you get the idea.

Tl;DR version; for most things at least, it's easier and probably more efficient to use the 8502. =-)
Title: Re: a mathematical demo
Post by: Singaja on 13:08, 15 May 16
In terms of π generation algorithm used , isn't the Ramanujan algorithm a viable approach? It might be too much for the Z80 to handle though.
The formula is:
(http://upload.wikimedia.org/math/a/0/a/a0aed2c76f429cc6bad435449f5d1ec9.png)
It's modern form formulated by Chudnovsky brothers is used for current record braking.
Title: Re: a mathematical demo
Post by: ZbyniuR on 17:41, 15 May 16
As I know C128 have 3 modes of work:
VIC-II + MOS 1MHz - the same colors, sprites and resolutions as C64.

VDC  + MOS 2MHz - with different RGBI 16 colors, max 640x400 in 64K VRAM, with faster processor and some kind blitter but without sprites at all.

VDC  + Z80 2MHz - graphics as above but because Zilog must be twice as fast as MOS to have equal power, and as you see in that case IS NOT, so default mode in CPM is semigraphic text mode. 4K for screen. Half for characters and half for colors for each sign. So forget about something spectacular in Zilog mode.

C128 with FDD cost as 6128 with monitor. But Commodore was sold in more countries then CPC and had traditions to selling popular computers for games (C64), and computers for small business (CBM series) with more popular 5.25" floppy. Adverts was fantastic. ;)  Amstrad was new on market and was know local in part of Europe only. To buy big FDD for CPC was cheeper than buy monitor for C128, but who knew about it?
Title: Re: a mathematical demo
Post by: FloppySoftware on 22:37, 15 May 16
Quote from: litwr on 21:02, 14 May 16
I tried also to make PCW version but it looks almost impossible.  PCW has a good emulator but it is the one only and without debugger. :( I couldn't find a way to use timer under PCW.  There is almost complete absence of the programming documentation for PCW.  It looks like a big oddity for so mass produced computer.  I used PCW during 3 years (1989-1991)... Could anybody provide any help with information about timer?

The Amstrad PCW runs under CP/M Plus, then, you could use the time fields stored in the SCB; this is valid for the CPC when running CP/M Plus too.

The SCB parts you are interested in are the clock minutes and seconds.

So, there is a lot of information about PCW programming at CP/M level (tons of books out there).

Regarding PCW emulators, there are two of them:

  1. Joyce from John Elliott: JOYCE for UNIX (http://www.seasip.info/Unix/Joyce/)
  2. CP/M Box from Habi: CP/M Box (http://www.habisoft.com/pcw/)

Joyce was the first one, with a LocoScript-like GUI, and CP/M Box is more recent, with a nowadays GUI.

Good luck.
Title: Re: a mathematical demo
Post by: mahlemiut on 23:30, 15 May 16
MAME emulates the PCW also.
Title: Re: a mathematical demo
Post by: TMR on 01:39, 16 May 16
Quote from: ZbyniuR on 17:41, 15 May 16
As I know C128 have 3 modes of work:
VIC-II + MOS 1MHz - the same colors, sprites and resolutions as C64.

Sort of... the 8502 can be run at 2MHz in the upper and lower borders which means 2MHz for about a third of the display on a PAL machine. Resolutions and sprites are the same, but the MMU means it's possible to double buffer the colour RAM and, because it's a VIC-IIe rather than just a VIC-II, the test bit can be (ab)used to either swap the R and G values of the standard palette or desaturate it completely - these aren't documented and only work on a CRT it seems.

Quote from: ZbyniuR on 17:41, 15 May 16VDC  + MOS 2MHz - with different RGBI 16 colors, max 640x400 in 64K VRAM, with faster processor and some kind blitter but without sprites at all.

It's not a blitter, there's a DMA for moving data around within the VDC RAM, and getting data back and forth between there and the system RAM where the CPU can deal with it isn't very efficient. There are hardware smooth and coarse scrolling options for the VDC as well.

And there's a fourth mode you missed by the way, VIC-IIe and Z80 does work even though there are those caveats  mentioned previously.
Title: Re: a mathematical demo
Post by: litwr on 14:47, 16 May 16
Quote from: FloppySoftware on 22:37, 15 May 16
The SCB parts you are interested in are the clock minutes and seconds.
So, there is a lot of information about PCW programming at CP/M level (tons of books out there).
Thanks but could you point to the information about 300 Hz timer?  How to use this interrupt?  The seconds level is too crude for the demo, it requires at least 0.1 second.
Quote from: mahlemiut on 23:30, 15 May 16
MAME emulates the PCW also.
Did you run PCW with MAME?  MAME is very difficult to use and it doesn't work in a lot of cases. :(
Title: Re: a mathematical demo
Post by: mahlemiut on 23:25, 16 May 16
Quote from: litwr on 14:47, 16 May 16Did you run PCW with MAME?  MAME is very difficult to use and it doesn't work in a lot of cases. :(
Uh yes, I've worked on MAME's PCW driver a bit (although arnoldemu is the original author of the driver).
Title: Re: a mathematical demo
Post by: arnoldemu on 13:21, 17 May 16
Quote from: mahlemiut on 23:25, 16 May 16
Uh yes, I've worked on MAME's PCW driver a bit (although arnoldemu is the original author of the driver).
Yes, many years ago....

@litwr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1057): You said "MAME is very difficult to use and it doesn't work in a lot of cases.".

Are you referring to the emulation of the PCW, or the MAME emulator itself?

When you say it doesn't work in a lot of cases is this PCW, CPC, or MAME not working with your hardware?

The PCW emulation was based off the official documents. I didn't have a PCW to test things on so the emulation is likely to be inaccurate.

Title: Re: a mathematical demo
Post by: arnoldemu on 13:30, 17 May 16
Quote from: litwr on 14:47, 16 May 16
 
Thanks but could you point to the information about 300 Hz timer?  How to use this interrupt? 
Notes on PCW I/O ports (http://www.chiark.greenend.org.uk/~jacobn/cpm/pcwports.html)

Amstrad "Joyce" software interface specification (http://www.chiark.greenend.org.uk/~jacobn/cpm/pcwio.html)

I don't know how the timer is connected in the cpm system, so you may need to hit the hardware directly.

It is probably similar to the CPC in it's operation.

I would say that to determine if the interrupt is from fdc or the timer you should read the timer counter register and see if it changed.

Something a bit like this (totally untested):



di
ld a,&c3
ld hl,int_handler
ld (&0038),a
ld (&0039),hl
;; initialise base-line timer count
in a,(&f4)
ld (timer_count),a
ei

loop:
jp loop

int_handler:
push bc
push af
in a,(&f4) ;; read current
ld c,a
ld a,(timer_count) ;; different to previous read?
cp c
jr z,int_handler2
;; timer changed, assume int is from timer.
ld a,c
ld (timer_count),a

;; do timer based int stuff.

int_handler2:
pop af
pop bc
ei
reti



timer_count:
defb 0


The code will not work well if a fdc int happens at the same time as a timer int. It's difficult to know which caused the int. So it's best if floppy uses nmi. If you disable int sources from fdc, then the int will be the timer one.

It's also not clear if im 2 and vectored interrupts can be used, the document doesn't mention it at all. It also doesn't mention how to differentiate the two.

EDIT: Now I read the document you *can* tell if it's timer or not.




di
ld a,&c3
ld hl,int_handler
ld (&0038),a
ld (&0039),hl
ei

loop:
jp loop

int_handler:
push bc
push af
in a,(&f8) ;; read system status
bit 5,a ;; fdc interrupted?
jr nz,int_handler2 ;; ignore

;; do timer based int stuff.

int_handler2:
pop af
pop bc
ei
reti





Title: Re: a mathematical demo
Post by: litwr on 16:57, 17 May 16
Thanks for the code.  :)  IMHO it will not work because the interrupt may occur during the system call when CPU is in other bank of memory. So we need a kind of RSX but can this RSX work with interrupt is a question.  So absence of documentation indirectly confirms that this is impossible.  :(
There is other problem.  I tried ZSID 1.4 with PCW CP/M.  It worked fine with Amstrad CPC CP/M 2.2 or Commodore C128 CP/M 3 but it doesn't work with PCW CP/M or Amstrad CP/M 3. :( Is there version of ZSID for Amstrad CP/M 3?  I can't even find word ZSID in the AMSTRAD wikipedia. :(
[MAME,MESS] It asks for two ROMs... BTW the newer MAME's become very odd it may even demand non-existed firmware. :(

*EDIT* I've just found a patch for ZSID at Digital Research Binary Files (http://www.uxpro.com/cpm/www.cpm.z80.de/binary.html) which fixed ZSID.  :)
Title: Re: a mathematical demo
Post by: mahlemiut on 23:47, 17 May 16
Quote from: litwr on 16:57, 17 May 16[MAME,MESS] It asks for two ROMs... BTW the newer MAME's become very odd it may even demand non-existed firmware. :(
You mean the printer MCU and keyboard MCU dumps?  I'm sure they're around here somewhere.
The keyboard MCU is used for keyboard handling, the printer MCU is used for printing and booting (this is where the bootstrap code comes from, although MAME doesn't yet do the proper boot sequence as it requires the Z80 being able to stop mid-instruction).
Title: Re: a mathematical demo
Post by: arnoldemu on 09:11, 18 May 16
Quote from: mahlemiut on 23:47, 17 May 16
You mean the printer MCU and keyboard MCU dumps?  I'm sure they're around here somewhere.
The keyboard MCU is used for keyboard handling, the printer MCU is used for printing and booting (this is where the bootstrap code comes from, although MAME doesn't yet do the proper boot sequence as it requires the Z80 being able to stop mid-instruction).
@litwr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1057): MAME is correct here.The PCW boots from the printer, it forces the bytes to the z80 which runs them.
The keyboard MCU is also required for correct emulation because the keyboard and PCW communicate keyboard codes.
Title: Re: a mathematical demo
Post by: litwr on 11:37, 18 May 16
This MESS became a total mess.  :o I'd found ROMs, ran MESS and got "THIS SYSTEM DOESN'T WORK"  :( It is MESS 0.154
MESS has no debugger too... So I prefer to try CPM-box under VirtualBox.  I remember PCW as friendly computer but I was in error.  It couldn't even read CPC disks.  iDSK and CPCXFS utilities do not work with PCW disk images.  I am almost ready to cease to do anything with all this mess. :(
Title: Re: a mathematical demo
Post by: robcfg on 11:51, 18 May 16
MESS (well, now it's MAME altogether) is always work in progress, but it has indeed a debugger.


Also, latest version is 0.173 IIRC.


I agree that CP/M Box is easier to use, but MAME and CP/M Box objectives are different.
Title: Re: a mathematical demo
Post by: arnoldemu on 13:05, 18 May 16
Quote from: litwr on 11:37, 18 May 16
... iDSK and CPCXFS utilities do not work with PCW disk images.  ....
cpcxfs does.

You need the cpmdiscs.def file next to the cpcxfs executable. The cpmdiscs.def is in the cpcxfs.zip file you can download from my website.

Then when you run cpcxfs you can type "formats" to list them. They are named PC1A, PC1B, PCW2 and PCW3.
These are 173k single sided, 173K double sided and 706K.

If you want to format use this:

format -f PCW3

and when you open a disc use -f to define which it is. Sometimes it can autodetect, but because many formats share common sector ids and number of sectors per track (but differing number of filenames in the directory etc) it can gues the wrong one.


Title: Re: a mathematical demo
Post by: mahlemiut on 13:55, 18 May 16
Quote from: litwr on 11:37, 18 May 16
This MESS became a total mess.  :o I'd found ROMs, ran MESS and got "THIS SYSTEM DOESN'T WORK"  :( It is MESS 0.154
MESS has no debugger too... So I prefer to try CPM-box under VirtualBox.  I remember PCW as friendly computer but I was in error.  It couldn't even read CPC disks.  iDSK and CPCXFS utilities do not work with PCW disk images.  I am almost ready to cease to do anything with all this mess. :(
It has the system doesn't work flag because the boot process is still not accurate.  The system does generally work, however (last I checked ;)).
Add -debug to the commandline to use the debugger.
Title: Re: a mathematical demo
Post by: litwr on 18:20, 18 May 16
Quote from: arnoldemu on 13:05, 18 May 16
If you want to format use this:

format -f PCW3

and when you open a disc use -f to define which it is. Sometimes it can autodetect, but because many formats share common sector ids and number of sectors per track (but differing number of filenames in the directory etc) it can gues the wrong one.
Thanks! :) It works but -f option of open command is undocumented. :( BTW your code for timing works too. :) The emulated by CPM-Box PCW8256 is a bit slower than CPC6128.  The timer and stopwatch gave almost the identical results.  Joyce is less accurate, its results are 12% faster than the reality of stopwatch.
The results for PCW8256 look a bit incorrect.  Either its z80 has no wait-states at all or CP/M Box is not accurate enough...
Is there dedicated to PCW forum?

Quote from: mahlemiut on 13:55, 18 May 16
It has the system doesn't work flag because the boot process is still not accurate.  The system does generally work, however (last I checked).
Add -debug to the commandline to use the debugger.
I tried to load CP/M.  It was loaded successfully with Joyce or CP/M Box.  MESS shows the initial CP/M screen but the prompt was not shown - the system began meditation.  Maybe newer MESS works better... BTW MESS shows that PCW8256 uses CPU at 4 MHz, Wikipedia says that it is 3.4 MHz.  What is right?
Title: Re: a mathematical demo
Post by: mahlemiut on 23:27, 18 May 16
Quote from: litwr on 18:20, 18 May 16
I tried to load CP/M.  It was loaded successfully with Joyce or CP/M Box.  MESS shows the initial CP/M screen but the prompt was not shown - the system began meditation.  Maybe newer MESS works better... BTW MESS shows that PCW8256 uses CPU at 4 MHz, Wikipedia says that it is 3.4 MHz.  What is right?
Quickly looking at the schematics (not something I'm great at), it looks like it is 4MHz (from the base clock of 32MHz).  Likely has some wait states that may slow it down, but I don't know the details on that.
Title: Re: a mathematical demo
Post by: arnoldemu on 06:40, 19 May 16
Quote from: litwr on 18:20, 18 May 16
 
Thanks! :) It works but -f option of open command is undocumented. :(

I will fix that :)
Title: Re: a mathematical demo
Post by: arnoldemu on 06:42, 19 May 16
Quote from: mahlemiut on 23:27, 18 May 16
Quickly looking at the schematics (not something I'm great at), it looks like it is 4MHz (from the base clock of 32MHz).  Likely has some wait states that may slow it down, but I don't know the details on that.
From Amstrad's specification:

"The processor is a Z80A-CPU running at a clock frequency of 4.00 MHz (+/-0.1%).  There is logic that stretches /MREQ cycles using the processor /WAIT input during VDU accesses to the screen memory; this is the same as for the CPC464, but note that, unlike the CPC464, IORQ cycles are not stretched.  The main board hardware does not make use of the processor's refresh counter, but expansion memory add-ons may use this feature."
Title: Re: a mathematical demo
Post by: litwr on 18:51, 02 September 16
Quote from: arnoldemu on 06:40, 19 May 16
I will fix that :)
Thanks. :)

I have just released a new update.  It contains data for rare but famous systems, for example, the first ARM system which cost above £4000 at 1986, the fastest 8-bit PC (Acorn BBC Micro with 6502 @4MHz and Z80 @6MHz), ...  All data for Acorn systems are gotten from real hardware.  I still have problem with data for Amstrad PCW.  CPM Box looks quite accurate but I suspect up to 10% inaccuracy in timing.  Z80 at PCW should be a bit faster than at CPC because it has less wait states but CPM-Box shows PCW a bit slower than CPC.
Does anybody know where could I ask for help with the hardware to run my demo?  Is it true that PCW models 8256, 8512, 9512 have the same CPU performance?  Thanks.
π (http://litwr2.atspace.eu/pi/pi-spigot-benchmark.html)

Title: Re: a mathematical demo
Post by: TFM on 19:50, 02 September 16
Quote from: litwr on 18:51, 02 September 16
Thanks. :)


... the fastest 8-bit PC (Acorn BBC Micro with 6502 @4MHz and Z80 @6MHz)


Sorry dude, the fastest 8 bit PC ist the Genie IIIS with two Z80 at 8 MHz. I got one at home, so I'm not telling rumors.  :)
Title: Re: a mathematical demo
Post by: robcfg on 20:33, 02 September 16
Well, for CPMBox assistance, I'll summon @Habi (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1314) as he programmed it and is a PCW expert.

Also, I have some swedish Luxor computers which have a very powerful basic dialect. Maybe they are worth testing.
Title: Re: a mathematical demo
Post by: litwr on 10:48, 03 September 16
Quote from: TFM on 19:50, 02 September 16
Sorry dude, the fastest 8 bit PC ist the Genie IIIS with two Z80 at 8 MHz. I got one at home, so I'm not telling rumors.  :)
Are you sure?  I could find The Machine Room :: TCS Trommeschlaeger :: Genie IIIs :: Quick view (http://machine-room.bedroomlan.org/computers/869).  It says about 7.2 MHz.  Acorn z80 for BBC Micro works without wait states at all.  Do you have CP/M for your Genie IIIS?  I can attach the version of my demo without timer support for a stopwatch... However 6502 @4MHz is generally a bit faster than 8 MHz z80 without any delays.
Quote from: robcfg on 20:33, 02 September 16
Well, for CPMBox assistance, I'll summon @Habi (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1314) as he programmed it and is a PCW expert.
Also, I have some swedish Luxor computers which have a very powerful basic dialect. Maybe they are worth testing.
Thank you!  The work with benchmarks may improve emulators. :) I've just found http://www.amstrad.es/forum/viewforum.php?f=35 (http://www.amstrad.es/forum/viewforum.php?f=35)
But my Spanish consists of several dozens words only. :( However I am going to try to register in hope to find several English speaking users (google translate may also help).
My demo is 100% ML and pretends to be the world fastest.  It may use Basic only to access to the timer.
Title: Re: a mathematical demo
Post by: robcfg on 12:52, 03 September 16
Habi is already registered here. I asked him and he said the timings should be the same as he emulates contention.

Also basic on the PCW is not specially optimal, it has bigger video memory and goes through bdos and bios instead of straight to firmware, which make it slower.
Title: Re: a mathematical demo
Post by: TFM on 19:11, 03 September 16
Quote from: litwr on 10:48, 03 September 16
Are you sure?  I could find The Machine Room :: TCS Trommeschlaeger :: Genie IIIs :: Quick view (http://machine-room.bedroomlan.org/computers/869).  It says about 7.2 MHz.  Acorn z80 for BBC Micro works without wait states at all.  Do you have CP/M for your Genie IIIS?

I am sure.  :)  Therefore I told that I actually have (and use) one, because the Dumbnet tells no nothing about it. Both Z80H CPUs run without waitstates. The Genie IIIS (special version for medical applications, not the slow 7.2 MHz one) has its own 64 KB Video-memory so there is no need for wait states. The RAM is the quick and expansive one (it has 256 KB, but can be expanded to 1 MB). You can add up to four extra CPU cards with a Z80H running at 8 MHz and having it's own 64 KB RAM.
The CPUs can communicate by using I/O ports and by sharing the same(!) RAM together.

It also has two each Z80SIO and Z80PIO and an RTC. A hard-disc (I never had) can be connected too.

There are two versions of CP/M Plus. They are both really well done.

There is also the ability of using Newdos-80 and other stuff related to TRS computers.

The GFX is 512 x 512 and a textmode can be / is overlayed. Very nice

The sound.... doesn't exit.  ;D

However 6 MHz Z80 + 4 MHz 6502 is slower than 8 MHz Z80 + 8 MHz Z80  :)


To compare the good Z80 to an 6502... oh please spare us this kind of flame war.  :-\
Title: Re: a mathematical demo
Post by: litwr on 09:03, 04 September 16
Quote from: robcfg on 12:52, 03 September 16
Habi is already registered here. I asked him and he said the timings should be the same as he emulates contention.

Also basic on the PCW is not specially optimal, it has bigger video memory and goes through bdos and bios instead of straight to firmware, which make it slower.
¡muchas gracias!  Sorry I want to believe but I have doubts.  The results from CPM-Box give me several points for them.  I repeat the program doesn't use Basic it is the pure machine language.  So PCW has to be a bit faster than CPC....  I have registered at amstrad.es/forum but I have no rights to write a new message.  :(
Quote from: TFM on 19:11, 03 September 16
I am sure.  :)  Therefore I told that I actually have (and use) one, because the Dumbnet tells no nothing about it. Both Z80H CPUs run without waitstates. The Genie IIIS (special version for medical applications, not the slow 7.2 MHz one) has its own 64 KB Video-memory so there is no need for wait states. The RAM is the quick and expansive one (it has 256 KB, but can be expanded to 1 MB). You can add up to four extra CPU cards with a Z80H running at 8 MHz and having it's own 64 KB RAM.
The CPUs can communicate by using I/O ports and by sharing the same(!) RAM together.

It also has two each Z80SIO and Z80PIO and an RTC. A hard-disc (I never had) can be connected too.

There are two versions of CP/M Plus. They are both really well done.

There is also the ability of using Newdos-80 and other stuff related to TRS computers.

The GFX is 512 x 512 and a textmode can be / is overlayed. Very nice

The sound.... doesn't exit.  ;D

However 6 MHz Z80 + 4 MHz 6502 is slower than 8 MHz Z80 + 8 MHz Z80  :)

To compare the good Z80 to an 6502... oh please spare us this kind of flame war.  :-\

It looks like you are telling about some very big rarity which is even without the common name.  Have you any link to its description?  MSX has also video memory but it has wait states for Z80 too. ;) These kind of things should be tested.  I have attached a COM-file of my demo program which should run with any CP/M 2.2 compatible OS.  It doesn't print time.   So the stopwatch is required.  It is about 10 minutes for 3000 digits with z80 at 8 MHz, or slightly above a minute for 1000 digits.
The use of shared RAM looks implausible.  It requires the multi-bus architecture and multi-port RAM.  Do you have the schematic?
BBC Micro/Master architecture can use only one co-pro.  There are several options: 6502 (upto 4 MHz), z80 (upto 6 MHz), 6809, 32016, 80186, 68000, ARM1, ...  So the main processor is always 6502 at 2 MHz (it is the fastest 8-bit PC in the standard configuration).  So the fastest 8 bit configuration is 6502 @2 MHz and 6502 @4 MHz.
Two z80 are faster than one but it is just a theory.  We need special parallel codes to use the advantage of the several processors.  Almost all program will use only one processor.  Several processors gives a big advantage only for multitasking.  I could recommend your PC for SymbOS. :) So with my demo only the power of one CPU maybe used.
6502 to z80 performance ratio is discussed a lot of times.  I have the evidence of US game programmers from 80s - generally 6502 is 2.2-2.4 times faster.  I have my own researches (e.g., XLIFE-8 (http://litwr2.atspace.eu/xlife/retro/xlife8.html)) which show the same ratio.  However my mathematical demo depends heavily on division where z80 may show better performance (up to 1.7) so with my demo 8 MHz z80 maybe faster than 6502 @4 MHz.
I can give a link to BBC Basic benchmark.  This Basic is ported to z80, 80x86, ... - almost everywhere.  IMHO it is the best 8-bit Basic.  The results show performance of 6 MHz z80 with this Basic - have z80 second processor? please run this for me! - stardot.org.uk (http://www.stardot.org.uk/forums/viewtopic.php?f=3&t=11491#p147533), so this z80 performance is close to 6502 at 2.46 MHz that gives 6/2.46 ≈ 2.44 ratio.
Title: Re: a mathematical demo
Post by: TFM on 20:34, 04 September 16
Well, I know two other guys having the same Genie IIIS in Germany. To one I still have contact, he also got two Z80 with 8 MHz. The machine was a high end computer of course, not a classic home computer. But the seem to have produced a decent number of them. The problem is just that information of the 80ies / 90ies got very badly conserved, so today it's hard to find.

Quote from: litwr on 09:03, 04 September 16I could recommend your PC for SymbOS. :)

No thanks!!! I use FutureOS.  ;D
Title: Re: a mathematical demo
Post by: litwr on 19:13, 05 September 16
I've just made a special version for Amstrad PCW.  It will work with Amstrad PCW only.  It uses two methods to calculate time.  One counts 300 Hz interrupts.  Another uses call to BDOS 105.  Both results are printed.  CPM-Box always gives a bit different values.  Sometimes the first value is bigger but sometimes the second value is bigger.  The difference is small.  It is below 0.1% for 8000 digits and slightly above 0.1% for 4000 digits.  However it is the emulator results.  I am curious about the hardware results...

Title: Re: a mathematical demo
Post by: Prodatron on 10:00, 06 September 16
The fastest mass-produced 8bit machine probably is the MSX TurboR. The R800 runs like a 30mhz Z80. There is always the discussion if it's already a 16bit CPU but it still has an 8bit data bus and behaves like a Z80, the whole machine is still 8bit based in total (not compareable to e.g. the Apple IIgs). Whats about the PcW16 with its 16Mhz Z80?
Title: Re: a mathematical demo
Post by: Audronic on 11:16, 06 September 16
Quote from: TFM on 19:11, 03 September 16
There is also the ability of using Newdos-80 and other stuff related to TRS computers.
Hi TFM
That is where came from. The TRS-80 world and Newdos 80, before i came across to the Amstrad world (Both Z80 Based).
Thanks for the memory.

Ray
Title: Re: a mathematical demo
Post by: TFM on 15:23, 06 September 16
Quote from: Audronic on 11:16, 06 September 16
Hi TFM
That is where came from. The TRS-80 world and Newdos 80, before i came across to the Amstrad world (Both Z80 Based).
Thanks for the memory.

Ray


That must have been a cool world too, I just got in contact with it relatively late. There were some real great Tandy / TRS computers (I still have a color genie with tape deck and memory expansion, free to a good home in 8 months). The company Trommelschläger made compatible computers called them Genie I, II or II. The mode IIS actually had an ECB bus. I saw it once, pretty neat.  :)
Title: Re: a mathematical demo
Post by: litwr on 15:57, 06 September 16
Hi, I mean the computers of classical 8-bit era which is ended to 1987-88.  So MSX turbo R is out of competition.  However R800 is very good. :) But Japanese were always a bit late.
There is a video which runs my demo with the fastest z80 for today at Acorn Atom. ;)
https://www.youtube.com/watch?v=wlcGm8DSo6o&feature=youtu.be (https://www.youtube.com/watch?v=wlcGm8DSo6o&feature=youtu.be)  :D
Quote from: Prodatron on 10:00, 06 September 16
Whats about the PcW16 with its 16Mhz Z80?
It is interesting to test it! :)  But this is very rare stuff...
Title: Re: a mathematical demo
Post by: TFM on 18:31, 06 September 16
Quote from: Prodatron on 10:00, 06 September 16
The fastest mass-produced 8bit machine probably is the MSX TurboR. The R800 runs like a 30mhz Z80. There is always the discussion if it's already a 16bit CPU but it still has an 8bit data bus and behaves like a Z80, the whole machine is still 8bit based in total (not compareable to e.g. the Apple IIgs). Whats about the PcW16 with its 16Mhz Z80?

Can you make some tests in reality to see "how fast" the TurboR is compared to f.e. the CPC. Just some Z80 routine maybe? That would be really interesting.

The PcW16 is a good point, but it doen't contain an real Z80, it's more like a fully Z80 like custom chip (take a look at the PCB). That's fine of course. But what I don't remember is, if it had wait states? I assume not.

Aside of it we also got the RT280, which hat a Z280 CPU running at 12,5 MHz (that's what I saw), but there was also an 25 MHz option (that's what I never saw). However the series of the RT280 was not very big, maybe only a few hundred.
Title: Re: a mathematical demo
Post by: litwr on 19:06, 06 September 16
R800 is about 4 times faster than z80 at the same frequency and it has a bonus of hardware multiplication instruction.  R800 maybe more than 10 times faster for 16 bit instructions.
Just compare data at the sheet Z80 / R800 instruction set (http://map.grauw.nl/resources/z80instr.php)
You may also look for my demo results at π (http://litwr2.atspace.eu/pi/pi-spigot-benchmark.html) :)
Amstrad CPC is about 8 times slower than this advanced MSX computer with this demo.
Title: Re: a mathematical demo
Post by: Prodatron on 20:56, 06 September 16
Quote from: litwr on 19:06, 06 September 16
R800 is about 4 times faster than z80 at the same frequency and it has a bonus of hardware multiplication instruction.
Yes, because most instructions only require 1 cycle. As it runs at 7,xx MHz it should be like a 30MHz Z80.

EdoZ and me developed a benchmark tool for SymbOS to compare the supported platforms more or less in a 1:1 way.
Here are some screenshots with the results:
SymbOS MSX multitasking operating system - help needed! | MSX Resource Center (https://www.msx.org/forum/development/msx-development/symbos-msx-multitasking-operating-system-help-needed?page=374#comment-281008)
For the CPU I created three different tests:
- simple instructions: NOP, ADD A, etc...
- complex instructions: EX (SP),HL, if I remember correctly; the goal was to have a lot of memory access within only one short command as well
- 16bit instructions: ADD HL,??
The results are really interesting. You should compare the second screenshots for each platform ("score details"). Here you can see in a good way, how the R800 behaves compared to the Z80 for different types of commands, and you can also see, that the CPC is really faster than the MSX2 regarding the CPU (the total average speed is usually faster on the MSX2 because of the VDP/hardware blitter etc.).
The Enterprise is again different, as it runs at real 4MHz, if the code doesn't run inside the video ram page (a little bit like "fast" and "chip" ram on the Amiga).
Title: Re: a mathematical demo
Post by: robcfg on 21:15, 06 September 16
If I remember right @TFM (http://www.cpcwiki.eu/forum/index.php?action=profile;u=179) , @Habi (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1314) and myself, we have PcW16.


So, if we find a way to run your test code on them, we'll do it gladly.
Title: Re: a mathematical demo
Post by: Edoz(MSX) on 22:17, 06 September 16
Quote from: Prodatron on 20:56, 06 September 16
Yes, because most instructions only require 1 cycle. As it runs at 7,xx MHz it should be like a 30MHz Z80.

EdoZ and me developed a benchmark tool for SymbOS to compare the supported platforms more or less in a 1:1 way.
Here are some screenshots with the results:
SymbOS MSX multitasking operating system - help needed! | MSX Resource Center (https://www.msx.org/forum/development/msx-development/symbos-msx-multitasking-operating-system-help-needed?page=374#comment-281008)
For the CPU I created three different tests:
- simple instructions: NOP, ADD A, etc...
- complex instructions: EX (SP),HL, if I remember correctly; the goal was to have a lot of memory access within only one short command as well
- 16bit instructions: ADD HL,??
The results are really interesting. You should compare the second screenshots for each platform ("score details"). Here you can see in a good way, how the R800 behaves compared to the Z80 for different types of commands, and you can also see, that the CPC is really faster than the MSX2 regarding the CPU (the total average speed is usually faster on the MSX2 because of the VDP/hardware blitter etc.).
The Enterprise is again different, as it runs at real 4MHz, if the code doesn't run inside the video ram page (a little bit like "fast" and "chip" ram on the Amiga).

Ah yes! This was very interesting to see indeed! As at some points the CPC was faster than a standard MSX but on other points it was visa versa. Cool thing is that you could really compare different home computers as they were running the same OS.

I recorded a movie of it some while ago on a low spec. MSX

Title: Re: a mathematical demo
Post by: Audronic on 23:44, 06 September 16
Quote from: TFM on 15:23, 06 September 16

That must have been a cool world too, I just got in contact with it relatively late. There were some real great Tandy / TRS computers (I still have a color genie with tape deck and memory expansion, free to a good home in 8 months). The company Trommelschläger made compatible computers called them Genie I, II or II. The mode IIS actually had an ECB bus. I saw it once, pretty neat.  :)
Hi TFM
I was involved with the testing of 2 External hard drive systems a year ago a Low cost Ide that we finally got going using "DOMS" and the other a "FreHD" an SD card Based Hard drive, These were for the Model 1/3/4/4p.
I also Have an equivalent to the Genie called a "System-80 and Expander" that with some help was able to get the "FreHD" to work with.


Thanks again for the Memory (sic)
Ray
Title: Re: a mathematical demo
Post by: litwr on 18:16, 07 September 16
Habi had generously helped with PCW10 hardware for 1000 digits.   :) It is surprising for me that the character output routine in PCW CP/M is much faster than at CPC CP/M.
Quote from: Prodatron on 20:56, 06 September 16
EdoZ and me developed a benchmark tool for SymbOS to compare the supported platforms more or less in a 1:1 way.
Here are some screenshots with the results:
SymbOS MSX multitasking operating system - help needed! | MSX Resource Center (https://www.msx.org/forum/development/msx-development/symbos-msx-multitasking-operating-system-help-needed?page=374#comment-281008)
The Enterprise is again different, as it runs at real 4MHz, if the code doesn't run inside the video ram page (a little bit like "fast" and "chip" ram on the Amiga).
IMHO it is very difficult to understand the results.  What are the units of measurement?  Is it just a rank setting?  Why are there 1,9 (not just 1)?  ZX Spektrum is also using fast and slow RAM, isn't it?  I also miss the results for PCW.
Quote from: robcfg on 21:15, 06 September 16
If I remember right @TFM (http://www.cpcwiki.eu/forum/index.php?action=profile;u=179) , @Habi (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1314) and myself, we have PcW16.
So, if we find a way to run your test code on them, we'll do it gladly.
You may use the version for any CP/M for a stopwatch in the penultimate attachment.  I have just built a special version which should work with any CP/M 3.  It uses BDOS call to get timer but this call provides only results with 1 second accuracy.  So please use a stopwatch for 100 and 1000 results.
It is also worth to try PCW version from the previous attachment.  However I am not sure that it will work with PCW16.  Thanks in advance.  It maybe very precious result.
BTW It is interesting why did Alan Sugar ignore R800?  IMHO R800 at 16 MHz might compete with 80486 at 20 MHz...
Title: Re: a mathematical demo
Post by: litwr on 13:03, 05 October 16
The version 17 of pipack was released several days ago.  It contains the improved version for Amstrad CPC which became 15% faster for 100 digits.  I would like to make a version for the great SymbOS but it is the plans only.  I still hope to get results for the mentioned earlier rare Amstrad PCW16 or even more rare  Genie IIIS...  ;)
Title: Re: a mathematical demo
Post by: litwr on 21:11, 29 October 16
Pipack-18 is released.  It contains now the code for the best 8-bit CPU, 6809.  I can't call it perfect but it is the best de facto.  It is sad that I couldn't find forums dedicated to 6809 like for z80 or 6502.  Any help?  Please.  Dragon-32 showed (with screen off) the performance only a bit less than the fastest mass produced 8-bit home computers.  I hope that help of 6809 experts makes pi-demo for 6809 a bit faster.
Title: Re: a mathematical demo
Post by: litwr on 16:47, 29 January 17
Pi-pack-22 is ready.  Amstrad CPC/PCW programs became a bit faster.  ;D I am still curious to get results for PCW16.  ;)
http://litwr2.atspace.eu/pi/pi-spigot-benchmark.html (http://litwr2.atspace.eu/pi/pi-spigot-benchmark.html)
Title: Re: a mathematical demo
Post by: litwr on 09:21, 06 February 17
My obsession continues, pipack-23 is ready.  It has a minor fix to Amstad CPC Basic and a new program for ZX Spectrum 48k.  I expected that Speccy would be 10% faster than Amstrad but it shows only 2% speed gain.  Maybe emulators are not quite accurate. :( BTW I didn't meet ZX until 2017.  It was a bit shocking that its firmware forbids to use IY register.  :o
Powered by SMFPacks Menu Editor Mod