Generating an interrupt externally

For hardware talk only (please avoid ROM dumper stuff)
Post Reply
User avatar
powerofrecall
Very interested
Posts: 237
Joined: Fri Apr 17, 2009 7:35 pm
Location: USA

Generating an interrupt externally

Post by powerofrecall » Fri Oct 03, 2014 3:12 pm

Is there any way to trigger an exception externally, like by pulling a 68k pin down or something similar? I would love to have a small momentary switch or button on my development genesis to use as a way to break into a debugger.

User avatar
HardWareMan
Very interested
Posts: 713
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Fri Oct 03, 2014 4:11 pm

There is one external interrupt from joypad ports. But you must enable it, make sure that vector point to exception and then select which I/O port must fire up this exception. Read the "Sega Tech.doc".

Chilly Willy
Very interested
Posts: 2593
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sat Oct 04, 2014 3:04 am

Lightguns use the external int, so getting a lightgun is the easiest way to get the hardware necessary to trigger an ext int without custom hardware. Look at the source in sgdk for programming info on enabling and using the lightgun int.

r57shell
Very interested
Posts: 475
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Re: Generating an interrupt externally

Post by r57shell » Sat Oct 04, 2014 7:12 am

powerofrecall wrote:Is there any way to trigger an exception externally, like by pulling a 68k pin down or something similar?
All external interrupts working exactly in this way. Check M68k User Manual: Exception Processing section. If you have access to M68k pins (especially interrupts pins...) then you can use it. but it's hardware stuff.
Image

User avatar
powerofrecall
Very interested
Posts: 237
Joined: Fri Apr 17, 2009 7:35 pm
Location: USA

Post by powerofrecall » Sat Oct 04, 2014 3:52 pm

I like the lightgun approach, that's clever.

If I'm reading right, I could throw on a pushbutton switch to ground the BERR pin? Assuming it's not used the schematics suggest it's just being held up anyway. I don't want to cut any pins though.

User avatar
Jazzmarazz
Very interested
Posts: 60
Joined: Wed Mar 12, 2014 11:11 pm
Location: Michigan
Contact:

Post by Jazzmarazz » Sat Oct 04, 2014 5:12 pm

If it is in fact pulled up, then a switch to ground should work. I don't know what that specific pin is for though. Is that the pin used for the gun data?

Chilly Willy
Very interested
Posts: 2593
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sat Oct 04, 2014 5:52 pm

Jazzmarazz wrote:If it is in fact pulled up, then a switch to ground should work. I don't know what that specific pin is for though. Is that the pin used for the gun data?
No, that's the bus error pin. I'd not use that as the bus error isn't fully recoverable on the 68000. That was the "big" improvement on the 68010 - the bus error was now recoverable so it could be used by an external MMU for memory management. There are details in the 68000/010 hardware reference manual if you're really interested.

The light gun asserts the EXT INT through the controller interface... just enable INT on PB6 (I think, check the source to be sure) and the light gun can assert the proper pin on the controller port.

User avatar
Jazzmarazz
Very interested
Posts: 60
Joined: Wed Mar 12, 2014 11:11 pm
Location: Michigan
Contact:

Post by Jazzmarazz » Sat Oct 04, 2014 6:15 pm

So he can connect a button to pb6, yes? I think the reasoning he wants to mod it, is so he doesn't have to locate a light gun to use as a Dev tool. :P

User avatar
powerofrecall
Very interested
Posts: 237
Joined: Fri Apr 17, 2009 7:35 pm
Location: USA

Post by powerofrecall » Sat Oct 04, 2014 8:31 pm

I'm thinking like a little dongle for a controller port might be the way to go (unless I can find a cheap lightgun)

Chilly Willy
Very interested
Posts: 2593
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sun Oct 05, 2014 2:32 am

If you're even the least bit handy with a soldering iron, hooking a switch to a DB9 connector will be the cheapest thing to do. If you have a decent electronics store in town, it'd probably be less than $2. If you're all thumbs, the lightgun will be safe, but more expensive. However, if you were ever thinking of getting a lightgun, this gives you the perfect excuse to spend the money.
:D

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest