50 Hz interrupt generator module

57 views
Skip to first unread message

Steve Cousins

unread,
Jan 29, 2026, 11:23:54 AM (3 days ago) Jan 29
to retro-comp
As far as I'm aware there isn't a 'standard' 50 Hz interrupt source in the RCBus world. We have the Z80 CTC but these are now difficult to get hold of and are not part of typical RCBus systems.

In an attempt to fill the gap I've created SC737.

SC737 - Assembled A - w600.jpg

Alan Cox

unread,
Jan 29, 2026, 11:35:43 AM (3 days ago) Jan 29
to Steve Cousins, retro-comp
Nice. That's a useful gap filler.

I'd have probably chosen a 74HC4060 8)

--
You received this message because you are subscribed to the Google Groups "retro-comp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to retro-comp+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/retro-comp/c99071f2-4c3a-4316-9a99-a75f3135ac6dn%40googlegroups.com.

Wayne Warthen

unread,
Jan 29, 2026, 11:46:07 AM (3 days ago) Jan 29
to retro-comp
Excellent Steve!

I have been doing some initial testing/cleanup for the new RomWBW release and was lamenting my inability to test with a simple timer interrupt.  I will definitely add support to RomWBW.

Thanks, Wayne

Steve Cousins

unread,
Jan 29, 2026, 11:47:06 AM (3 days ago) Jan 29
to retro-comp
Thanks Alan

Yes, I considered the 4060 but I don't use it in any of my other projects, so using here would mean yet another component to stock and manage. Using the 393 is not as efficient but I already use them in several kits. Design is always a compromise :)

Steve Cousins

unread,
Jan 29, 2026, 12:15:22 PM (3 days ago) Jan 29
to retro-comp
Here is my simple test code

                    0001  ; Interrupt module (SC737) test for SCM
                    0002  
8000:               0003  CODE        .EQU  0x8000        ;Program code starts here
8100:               0004  DATA        .EQU  0x8100        ;Data in RAM starts here
000F:               0005  Port:       .EQU  0x0F          ;Interrupt controller port
                    0006  
                    0007              .PROC Z80           ;Assemble Z80 code
                    0008  
                    0009              .ORG  CODE          ;Start of code
                    0010  
                    0011  
                    0012  ; Main program sets up 50 Hz interrupt
                    0013  
8000: 3E 07         0014  Start:      LD   A,7            ;Jump table entry 7 (mode 1 int)
8002: 11 10 80      0015              LD   DE,Int         ;Address of Interrupt handler
8005: 0E 09         0016              LD   C,9            ;API 9 = Claim jump table entry
8007: F7            0017              RST  $30            ;Claim mode 1 interrupt
8008: ED 56         0018              IM   1              ;Set mode 1 interrupt
800A: FB            0019              EI                  ;Enable interrupts
800B: 3E 80         0020              LD   A,0x80
800D: D3 0F         0021              OUT  (Port),A       ;Enable 50Hz interrupt
800F: C9            0022              RET
                    0023  
                    0024  
                    0025  ; Interrupt handler (mode 1)
                    0026  
8010: F5            0027  Int:        PUSH AF
8011: DB 0F         0028              IN   A,(Port)       ;Bit 7 low if interrupt
8013: 17            0029              RLA                 ;  is being requested
8014: 30 04         0030              JR   NC,Int50Hz     ;Interrupt requested
8016: F1            0031              POP  AF             ;  so go handle it
8017: FB            0032              EI
8018: ED 4D         0033              RETI
                    0034  
801A: D5            0035  Int50Hz:    PUSH DE
801B: AF            0036              XOR  A
801C: D3 0F         0037              OUT  (Port),A       ;Clear interrupt
801E: 3D            0038              DEC  A
801F: D3 0F         0039              OUT  (Port),A       ;Reenable interrupt
8021: ED 5B 00 81   0040              LD   DE,(Count)
8025: 13            0041              INC  DE             ;Increment counter
8026: ED 53 00 81   0042              LD   (Count),DE
802A: D1            0043              POP  DE
802B: F1            0044              POP  AF
802C: FB            0045              EI
802D: ED 4D         0046              RETI
                    0047  
                    0048              .ORG  DATA          ;Start of data in RAM
                    0049  
8100: 00 00         0050  Count:      .DW   0             ;Interrupt counter
                    0051  
                    0052  
 

Alan Cox

unread,
Jan 29, 2026, 1:41:15 PM (3 days ago) Jan 29
to Steve Cousins, retro-comp
Added to EmulatorKit (option '-5')

Will take a look at adding it to the Fuzix int source detection when I have a bit more time


--
You received this message because you are subscribed to the Google Groups "retro-comp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to retro-comp+...@googlegroups.com.

Steve Cousins

unread,
Jan 29, 2026, 2:46:35 PM (3 days ago) Jan 29
to retro-comp
Wow, that was quick

Wayne Warthen

unread,
Jan 29, 2026, 4:35:47 PM (3 days ago) Jan 29
to Alan Cox, Steve Cousins, retro-comp
On Thu, Jan 29, 2026 at 10:41 AM Alan Cox <etched...@gmail.com> wrote:
Added to EmulatorKit (option '-5')

Nice.  This should allow me to add support to RomWBW prior to getting the hardware.

-Wayne 
Reply all
Reply to author
Forward
0 new messages