Author Topic: Zilog peripheral chips  (Read 4731 times)

0 Members and 1 Guest are viewing this topic.

Offline litwr

  • CPC6128
  • ****
  • Posts: 179
  • Country: ru
    • lidovski's www page
    • Awards
Zilog peripheral chips
« on: 18:13, 26 May 20 »
I know that Amstrad CPC/PCW, MSX, and ZX Spectrum never use RETI instruction.  I am curious is there any system in the world which can use this instruction?  As I know Zilog didn't produce their interrupt controller chip.  So it seems that RETI has been completely useless.  Maybe somebody knows more about it. Thank you.

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 4.088
  • Country: fr
    • ?area=showdonations;u=4
    • Awards
Re: Zilog peripheral chips
« Reply #1 on: 18:42, 26 May 20 »
RETI / RETN must be used with the Z80 CTC chip. In other case, the Z80 CPU will not aknowledge the next interrupt properly.
In example, on CPC with the PlayCity expansion.
« Last Edit: 18:47, 26 May 20 by TotO »
like
0
No reactions
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 3.004
  • Country: de
  • Reincarnation of TFM
    • FutureOS - Revolution and Revelation for CPC6128 and 6128plus
    • Awards
Re: Zilog peripheral chips
« Reply #2 on: 18:59, 26 May 20 »
I know that Amstrad CPC/PCW, MSX, and ZX Spectrum never use RETI instruction.  I am curious is there any system in the world which can use this instruction?  As I know Zilog didn't produce their interrupt controller chip.  So it seems that RETI has been completely useless.  Maybe somebody knows more about it. Thank you.
Well some of my games and FutureOS run in Interrupt Mode 2, therefore RETI is used. Especially on the 6128 Plus RETI is in such a case important.
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2022.01.11)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Offline litwr

  • CPC6128
  • ****
  • Posts: 179
  • Country: ru
    • lidovski's www page
    • Awards
Re: Zilog peripheral chips
« Reply #3 on: 09:28, 27 May 20 »

Thank you very much.
Well some of my games and FutureOS run in Interrupt Mode 2, therefore RETI is used. Especially on the 6128 Plus RETI is in such a case important.
As I know interrupt mode 2 and RETI are rather independent features, aren't they?  Or both of them can work only with the CTC? IMHO RETN doesn't depend on any external chip, it is used in the ZX Spectrum ROM.

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 3.004
  • Country: de
  • Reincarnation of TFM
    • FutureOS - Revolution and Revelation for CPC6128 and 6128plus
    • Awards
Re: Zilog peripheral chips
« Reply #4 on: 13:50, 27 May 20 »
Thank you very much.As I know interrupt mode 2 and RETI are rather independent features, aren't they?  Or both of them can work only with the CTC? IMHO RETN doesn't depend on any external chip, it is used in the ZX Spectrum ROM.
Well, I don't know about Spectrum world. I only know some other Z80 systems. Like Tot0 told, as soon as there are chips which provide an interrupt_end signal its needed. You can google for Z80 and daisy chain IIRC. The reason is to chain different interrupt sources. The spectrum has only one, but the 6128 Plus and expanded CPCs can have multiple. Therefore RETI is mandatory. 
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2022.01.11)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.031
    • Awards
Re: Zilog peripheral chips
« Reply #5 on: 16:44, 28 May 20 »
The CPC Plus doesn't pay any attention to RETI. It clears the PPI interrupt on interrupt acknowledge to retain compatibility with the old Gate Array method. If you turn on the very buggy interrupt redirection it could theoretically turn off the right DMA interrupt too, but since it gets this wrong there isn't any point. You have to manually clear the DMA interrupt states and after that just doing a RET is perfectly fine.
like
0
No reactions

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 3.004
  • Country: de
  • Reincarnation of TFM
    • FutureOS - Revolution and Revelation for CPC6128 and 6128plus
    • Awards
Re: Zilog peripheral chips
« Reply #6 on: 16:56, 28 May 20 »
Maybe, if no external hardware is connected. But I love the PlayCity. And using RETI is good practice. No need to use 'dirty' code. 'dirty' may be the wrong word, but you know what I mean.
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2022.01.11)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.031
    • Awards
Re: Zilog peripheral chips
« Reply #7 on: 17:36, 28 May 20 »
Sure, but it's another NOP lost every time. Which can be quite an overhead if you're doing right raster effects on a Plus etc.


YMMV.
like
0
No reactions

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 3.004
  • Country: de
  • Reincarnation of TFM
    • FutureOS - Revolution and Revelation for CPC6128 and 6128plus
    • Awards
Re: Zilog peripheral chips
« Reply #8 on: 00:16, 29 May 20 »
Sure, but it's another NOP lost every time. Which can be quite an overhead if you're doing right raster effects on a Plus etc.
YMMV.
Oh, well there may be that case that this us is needed. Ok, then use RET if you like - of course. However, usually we have 6 interrupts per second (without anything additional), so we loose 6 / 1.000.000 us. That's not that painful. Guess to unroll loops will help more.  :)
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2022.01.11)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Offline litwr

  • CPC6128
  • ****
  • Posts: 179
  • Country: ru
    • lidovski's www page
    • Awards
Re: Zilog peripheral chips
« Reply #9 on: 09:45, 06 June 20 »
Well some of my games and FutureOS run in Interrupt Mode 2, therefore RETI is used. Especially on the 6128 Plus RETI is in such a case important.
I am curious why to use Interrupt Mode 2 with the Amstrad CPC or PCW?  I know that the ZX Spectrum people have to use it because the interrupt vector for mode 1 is in ROM.  The CPC has it in RAM...  Interrupt mode 2 without Zilog's dedicated chips requires a 257 byte table - it is not little for 8-bit system.  Thank you.

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 3.004
  • Country: de
  • Reincarnation of TFM
    • FutureOS - Revolution and Revelation for CPC6128 and 6128plus
    • Awards
Re: Zilog peripheral chips
« Reply #10 on: 00:02, 07 June 20 »
Yes, there is a 257 byte table needed for the CPC - or less in some cases. But using IM 2 does not only enable to use expansions, it also has a great advantage: The lower RAM block can be used completely (for example a 2nd screen, or when using 32 KB V-RAM Overscan, ...).
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2022.01.11)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)