Q68 Advance Notice

Nagging hardware related question? Post here!
User avatar
Zarchos
ROM Dongle
Posts: 41
Joined: Mon May 08, 2017 11:49 am

Re: Q68 Advance Notice

Postby Zarchos » Fri Sep 08, 2017 5:49 pm

There is no issue.
I thought my queries were hurting people and in a way they could think I was underestimating the interest / quality of this new 'super QL' which is not the case at all : I admire the work provided and for sure this is a really great achievement.
In short : I want one !
Even if among the coders in my dev studio there will be some people who master 68000 programming, I have always wanted to learn properly 68000 ASM (I am an ARM ASM programmer, only), so I have a few questions.
Can you confirm the 68000 FPGA has the same timings (ie number of clock ticks) for the instructions than a real 68000 ?
I ask this because on the Archie (ARM based) I believe I have developped some very efficient routines to generate optimised ARM instructions to fast plot sprites on screen, and I'd like to adapt them to this 'Super QL' board.
The Archie uses linear screen modes, my routines work for 8 bit per pixel screen modes ; this super QL offers some linear screen modes too, 16 bits per pixel, so it is a perfect candidate to adapt the ideas used on the Archie to your 'super QL' board.
So it's why I'd like to know if, to use the best 68000 instructions (considering the number of cycles they use), I can learn 68000 and do that with any 68000 book, and the number of ticks given in any 68000 book for the instructions, matches the number of ticks your 'Super QL' takes too.
If there are other considerations to take into account, please give them to me. (For example in case the 68000 FPGA works in fact much faster (clock tick for clock tick) than a normal 68000 when accessing memory. It is of course the key point to write fast sprites plotting routines to know how many clock ticks the various instructions loading from, and storing to, memory, take).

We are ok on the fact the FPGA mimics a 68000, and not a 68008, are we ?

Thanks in advance,
Xavier.

PS : Simple proof of concept, with not even bank switching, of what I can get on an Archie at 8 Mhz, in 256 colour screen mode 320x256 is visible here :
- for fast sprites plotting :
https://youtu.be/K44V7ps_tfY
https://youtu.be/LgOEZvZK04M
-for fast horizontal segment plotting routines :
https://youtu.be/MDg2iOuTkSw
https://youtu.be/cLBSM1thRj8
https://youtu.be/Pjev7O7fKjA



So you've got something very important to do right now ?
Why not first waste some precious minutes of your life watching some stupid videos about games and demos on the Archimedes on my YT channel ?
---> https://www.youtube.com/user/Archimedes75009
User avatar
Peter
Gold Card
Posts: 369
Joined: Sat Jan 22, 2011 8:47 am

Re: Q68 Advance Notice

Postby Peter » Fri Sep 08, 2017 7:21 pm

Zarchos wrote:Can you confirm the 68000 FPGA has the same timings (ie number of clock ticks) for the instructions than a real 68000 ?

No, it is faster, except that it is slowed down by external SDRAM. I'd like to publish some benchmarks when I find the time, but I can not provide complete cycle timing documentation, sorry.
Simple register to register instructions are 4 clock cycles, i.e. 100 ns.
Instructions like MOVE (Ax),Dx or MOVE Dx,(Ax) 200 ns, DBF Dx,* 300 ns.
Multiplication is fast, shifting usually doesn't speed things up.
This goes for external SDRAM, internal RAM is even faster.
Everything subject to change.

Zarchos wrote:We are ok on the fact the FPGA mimics a 68000, and not a 68008, are we ?

Yes.


User avatar
NormanDunbar
Gold Card
Posts: 291
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Q68 Advance Notice

Postby NormanDunbar » Fri Sep 08, 2017 7:24 pm

Good Evening Zarchos,

I don't know about the FPGA, sorry, but as for a 68000 Assembly Language book, you could do worse than http://qdosmsq.dunbar-it.co.uk/downloads/QLToday/QL_Assembly.pdf which is QL based. (Gratuitous plug!) ;)

Cheers,
Norm.


Why do they put lightning conductors on churches?
How come Tarzan never grew a beard?
User avatar
NormanDunbar
Gold Card
Posts: 291
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Q68 Advance Notice

Postby NormanDunbar » Fri Sep 08, 2017 10:33 pm

You can also download the Motorola Programmers Manual at http://www.nxp.com/docs/en/reference-ma ... 000PRM.pdf officially!

Cheers,
Norm.


Why do they put lightning conductors on churches?
How come Tarzan never grew a beard?
User avatar
Zarchos
ROM Dongle
Posts: 41
Joined: Mon May 08, 2017 11:49 am

Re: Q68 Advance Notice

Postby Zarchos » Sat Sep 09, 2017 3:06 am

Thanks for your answers and links provided.
If the Q68 timings are not available, I'll simply have to time various sequences of 68000 instructions to know which ones to retain.
I must admit working in the fog is not exactly what I like, though.
I'll probably start a new thread on this board to check the code with the knowledge you guys have of the 68000 / 68020 (and probably to discover sbdy did on the QL what I did on the Archie ah ah !).
I say 68000 / 68020 because the idea behind my code is that it is a 'realtime' generator of ASM instructions to perform plotting of a sprite : what is generated does exactly what is needed to fast plot the sprite (its shape, it doesn't lose time handling the rectangle the sprite fits in) and so ASM instructions can be the best ones for the 680x0 machine it executes on.
I hope all this is understandable English ;-)

Envoyé de mon XT1650 en utilisant Tapatalk



So you've got something very important to do right now ?
Why not first waste some precious minutes of your life watching some stupid videos about games and demos on the Archimedes on my YT channel ?
---> https://www.youtube.com/user/Archimedes75009
User avatar
Zarchos
ROM Dongle
Posts: 41
Joined: Mon May 08, 2017 11:49 am

Re: RE: Re: Q68 Advance Notice

Postby Zarchos » Fri Oct 06, 2017 6:17 am

Zarchos wrote:Thanks for your answers and links provided.
If the Q68 timings are not available, I'll simply have to time various sequences of 68000 instructions to know which ones to retain.
I must admit working in the fog is not exactly what I like, though.
I'll probably start a new thread on this board to check the code with the knowledge you guys have of the 68000 / 68020 (and probably to discover sbdy did on the QL what I did on the Archie ah ah !).
I say 68000 / 68020 because the idea behind my code is that it is a 'realtime' generator of ASM instructions to perform plotting of a sprite : what is generated does exactly what is needed to fast plot the sprite (its shape, it doesn't lose time handling the rectangle the sprite fits in) and so ASM instructions can be the best ones for the 680x0 machine it executes on.
I hope all this is understandable English ;-)

Envoyé de mon XT1650 en utilisant Tapatalk
What is the technology / chip used for the sound ?
How is it connected to the CPU and RAM ?
Is it a buffer system to fill in with the processor, and then its contents is read under DMA ; or sthing completely different ?
Has it got any kind of software support already ?
Possible Amiga or better than 4 channel MOD ( Fastrekker ) support ?

Envoyé de mon SM-G900F en utilisant Tapatalk



So you've got something very important to do right now ?
Why not first waste some precious minutes of your life watching some stupid videos about games and demos on the Archimedes on my YT channel ?
---> https://www.youtube.com/user/Archimedes75009
User avatar
tofro
QL Wafer Drive
Posts: 1156
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: RE: Re: Q68 Advance Notice

Postby tofro » Fri Oct 06, 2017 8:53 am

Zarchos wrote:
Zarchos wrote:Envoyé de mon XT1650 en utilisant Tapatalk
What is the technology / chip used for the sound ?
How is it connected to the CPU and RAM ?
Is it a buffer system to fill in with the processor, and then its contents is read under DMA ; or sthing completely different ?
Has it got any kind of software support already ?
Possible Amiga or better than 4 channel MOD ( Fastrekker ) support ?


I'm trying to answer this based on Q40/Q60 knowledge (the Q68 uses the identical sound system)

The sound system is built in pure Sinclair tradition (as simple as possible) and consists of a 2 channel stereo DAC and a periodic (10kHz or 20kHz) interrupt. DAC format is 8-bit, unsigned. The DACs are offered as simple registers, no DMA, no thrilling technology bits.

You basically simply feed the bytes into the left and/or right channel DAC in the periodic sampling ISR.

There is a minimum SSS (Sampled Sound System) driver available that handles queues of bytes, some minimal amount of up- and downsampling, the ISR and a simple Stereo-to-Mono conversion (and vice versa, if I remember right)

If you want more than the available 2 channels, you need to write your own mixer.

Tobias


User avatar
Peter
Gold Card
Posts: 369
Joined: Sat Jan 22, 2011 8:47 am

Re: Q68 Advance Notice

Postby Peter » Fri Oct 06, 2017 9:08 am

No, the hardware is not identical to Q40/Q60, as the 20 kHz interrupt overhead would slow down a 68000-style CPU considerably.
The Q68 includes a hardware FIFO, so the samples can be transferred by the OS in larger chunks. It is sufficient to transfer the samples with the frame interrupt.
If more details are required, I would ask to create a new thread, this was primarily a sales announcement.

Anyway I see no advantage in accessing the Q68 sound hardware directly. That should be done by the OS, as detailed under "Sampled Sound System":
http://www.dilwyn.me.uk/docs/ebooks/smsqe/SMSQE_A4.pdf
On that level, the system should be the same for Q40, Q60, Q68 and emulators.


User avatar
Zarchos
ROM Dongle
Posts: 41
Joined: Mon May 08, 2017 11:49 am

Re: RE: Re: Q68 Advance Notice

Postby Zarchos » Fri Oct 06, 2017 9:47 am

Peter wrote:No, the hardware is not identical to Q40/Q60, as the 20 kHz interrupt overhead would slow down a 68000-style CPU considerably.
The Q68 includes a hardware FIFO, so the samples can be transferred by the OS in larger chunks. It is sufficient to transfer the samples with the frame interrupt.
If more details are required, I would ask to create a new thread, this was primarily a sales announcement.

Anyway I see no advantage in accessing the Q68 sound hardware directly. That should be done by the OS, as detailed under "Sampled Sound System":
http://www.dilwyn.me.uk/docs/ebooks/smsqe/SMSQE_A4.pdf
On that level, the system should be the same for Q40, Q60, Q68 and emulators.
ok thanks to both of you.
And you are right it is off topic, I had not taken into account what you had already expressed about the aim of this thread.
Sorry for that.

Envoyé de mon SM-G900F en utilisant Tapatalk



So you've got something very important to do right now ?
Why not first waste some precious minutes of your life watching some stupid videos about games and demos on the Archimedes on my YT channel ?
---> https://www.youtube.com/user/Archimedes75009

Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 3 guests