Ralf Mardorf | 29 Jun 2010 16:21

Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling

For my understanding I wish to compare some knowledge from the C64 with
a modern Intel/AMD Linux PC. I don't have much knowledge about the C64
anymore, but some notes at hand.

Is there a difference for Intel/AMD Linux PCs for IRQs and NMIs? In
other words, for the C64's 6502 CPU there were two commands, SEI and
CLI.

The SEI command did disable IRQs. IIRC IRQs were interrupts for all
hardware and programs, excepted if a program called the SEI command.
IIRC just the restore and reset buttons did cause a NMI, an interrupt
that can't be disabled, but that isn't done by an interval
automatically.

So, if you did real time MIDI programming you call SEI to disable all
interrupts, so that just the currently needed MIDI rout was allowed to
run, there were no IRQs anymore.

For example you directly asked the UART connected to the bus if there
was a byte:

## see [1] easier to read for C64 Assembler coders

Load register_with_the_information_if_there_is_a_byte_for
an_MIDI_event_to_a_'memory'_register

LSR #to check if the flag is set

Branch
back_to_load_register_until_the_flag_isn't_cleared_or_as_long_it's_set
(Continue reading)

Ralf Mardorf | 29 Jun 2010 21:09

Re: Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling

On Tue, 2010-06-29 at 16:21 +0200, Ralf Mardorf wrote:
> For my understanding I wish to compare some knowledge from the C64 with
> a modern Intel/AMD Linux PC. I don't have much knowledge about the C64
> anymore, but some notes at hand.
> 
> Is there a difference for Intel/AMD Linux PCs for IRQs and NMIs? In
> other words, for the C64's 6502 CPU there were two commands, SEI and
> CLI.
> 
> The SEI command did disable IRQs. IIRC IRQs were interrupts for all
> hardware and programs, excepted if a program called the SEI command.
> IIRC just the restore and reset buttons did cause a NMI, an interrupt
> that can't be disabled, but that isn't done by an interval
> automatically.
> 
> So, if you did real time MIDI programming you call SEI to disable all
> interrupts, so that just the currently needed MIDI rout was allowed to
> run, there were no IRQs anymore.
> 
> For example you directly asked the UART connected to the bus if there
> was a byte:
> 
> ## see [1] easier to read for C64 Assembler coders
> 
> Load register_with_the_information_if_there_is_a_byte_for
> an_MIDI_event_to_a_'memory'_register
> 
> LSR #to check if the flag is set
> 
> Branch
(Continue reading)

Ralf Mardorf | 29 Jun 2010 21:20

Re: Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling

On Tue, 2010-06-29 at 21:09 +0200, Ralf Mardorf wrote:
> On Tue, 2010-06-29 at 16:21 +0200, Ralf Mardorf wrote:
> > For my understanding I wish to compare some knowledge from the C64 with
> > a modern Intel/AMD Linux PC. I don't have much knowledge about the C64
> > anymore, but some notes at hand.
> > 
> > Is there a difference for Intel/AMD Linux PCs for IRQs and NMIs? In
> > other words, for the C64's 6502 CPU there were two commands, SEI and
> > CLI.
> > 
> > The SEI command did disable IRQs. IIRC IRQs were interrupts for all
> > hardware and programs, excepted if a program called the SEI command.
> > IIRC just the restore and reset buttons did cause a NMI, an interrupt
> > that can't be disabled, but that isn't done by an interval
> > automatically.
> > 
> > So, if you did real time MIDI programming you call SEI to disable all
> > interrupts, so that just the currently needed MIDI rout was allowed to
> > run, there were no IRQs anymore.
> > 
> > For example you directly asked the UART connected to the bus if there
> > was a byte:
> > 
> > ## see [1] easier to read for C64 Assembler coders
> > 
> > Load register_with_the_information_if_there_is_a_byte_for
> > an_MIDI_event_to_a_'memory'_register
> > 
> > LSR #to check if the flag is set
> > 
(Continue reading)

Ichthyostega | 30 Jun 2010 06:34
Picon

Re: Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling


Ralf Mardorf schrieb:
> For my understanding I wish to compare some knowledge from the C64 with a 
> modern Intel/AMD Linux PC. I don't have much knowledge about the C64 anymore,
>  but some notes at hand.
> 
> Is there a difference for Intel/AMD Linux PCs for IRQs and NMIs? In other 
> words, for the C64's 6502 CPU there were two commands, SEI and CLI.
> 
> The SEI command did disable IRQs. IIRC IRQs were interrupts for all hardware 
> and programs, excepted if a program called the SEI command. IIRC just the 
> restore and reset buttons did cause a NMI, an interrupt that can't be 
> disabled, but that isn't done by an interval automatically.
> 
> So, if you did real time MIDI programming you call SEI to disable all 
> interrupts, so that just the currently needed MIDI route was allowed to run, 
> there were no IRQs anymore.
> 
> For example you directly asked the UART connected to the bus if there was a 
> byte
...

Hi Ralf,

above you give a very concise summary of what was the proper way of
programming in the days of the C64 :)

Now you ask about differences to today's CPUs / Systems.

* Most important, modern CPUs are always operated in the so called
(Continue reading)

Ralf Mardorf | 30 Jun 2010 07:15

Re: Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling

On Wed, 2010-06-30 at 06:34 +0200, Ichthyostega wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ralf Mardorf schrieb:
> > For my understanding I wish to compare some knowledge from the C64 with a 
> > modern Intel/AMD Linux PC. I don't have much knowledge about the C64 anymore,
> >  but some notes at hand.
> > 
> > Is there a difference for Intel/AMD Linux PCs for IRQs and NMIs? In other 
> > words, for the C64's 6502 CPU there were two commands, SEI and CLI.
> > 
> > The SEI command did disable IRQs. IIRC IRQs were interrupts for all hardware 
> > and programs, excepted if a program called the SEI command. IIRC just the 
> > restore and reset buttons did cause a NMI, an interrupt that can't be 
> > disabled, but that isn't done by an interval automatically.
> > 
> > So, if you did real time MIDI programming you call SEI to disable all 
> > interrupts, so that just the currently needed MIDI route was allowed to run, 
> > there were no IRQs anymore.
> > 
> > For example you directly asked the UART connected to the bus if there was a 
> > byte
> ...
> 
> Hi Ralf,
> 
> above you give a very concise summary of what was the proper way of
> programming in the days of the C64 :)
> 
(Continue reading)

Daniel James | 30 Jun 2010 10:38
Favicon
Gravatar

Re: Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling

Hi Ralf,

> Assumed it's not broken, than for my Terratec EWX 24/96 there's an issue
> for the pin allocation.

Are you using a 15-pin DIN (gameport) to 2 x 5 pin DIN convertor cable
with an optical isolator inside? I seem to recall the isolator was
required when using a gameport (for galvanic isolation?)

> Do the ports for most sound cards usually have the common pin
> allocation?

I think gameport MIDI was a standard from the Soundblaster range, which
other soundcards of the time adopted. According to the English version
of the manual for your card:

http://www.terratec.net/en/driver-and-support/faq_37196.html?selectproduct=EWX%2024/96

the pin i/o is standard for gameport MIDI.

Cheers!

Daniel
Ralf Mardorf | 30 Jun 2010 10:51

Re: Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling

On Wed, 2010-06-30 at 09:38 +0100, Daniel James wrote:
> Hi Ralf,
> 
> > Assumed it's not broken, than for my Terratec EWX 24/96 there's an issue
> > for the pin allocation.
> 
> Are you using a 15-pin DIN (gameport) to 2 x 5 pin DIN convertor cable
> with an optical isolator inside?

The original cable I did solder and use with an oldish on-board gameport
was without optical isolation. For the Terratec I added opto-couplers.

>  I seem to recall the isolator was
> required when using a gameport (for galvanic isolation?)

Correct, opto-couplers are a standard for MIDI to do galvanic isolation.

> > Do the ports for most sound cards usually have the common pin
> > allocation?
> 
> I think gameport MIDI was a standard from the Soundblaster range, which
> other soundcards of the time adopted. According to the English version
> of the manual for your card:
> 
> http://www.terratec.net/en/driver-and-support/faq_37196.html?selectproduct=EWX%2024/96

Thank you, on the quick I didn't found information about the pin
allocation, but I'll read it again in the evening.

> the pin i/o is standard for gameport MIDI.
(Continue reading)

Daniel James | 30 Jun 2010 11:01
Favicon
Gravatar

Re: Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling

Hi Ralf,

> on the quick I didn't found information about the pin
> allocation, but I'll read it again in the evening.

The Card Connections and their Application, page 30 in the English version.

> If so the card might be broken all the time, it's a gift, or I might
> have killed it, because I did a bad soldering

Try a ready made opto-isolated cable from eBay or a dusty computer shop,
about 5 euro.

If your card is really busted, there is one available on eBay.de right
now - the price is hovering at 1 euro, but there are five days to go!

http://cgi.ebay.de/Soundkarte-Terratec-EWX-24-96-/190410934543?cmd=ViewItem&pt=Studioequipment&hash=item2c5560490f

Cheers!

Daniel
Ralf Mardorf | 30 Jun 2010 11:19

Re: Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling

On Wed, 2010-06-30 at 10:01 +0100, Daniel James wrote:
> Hi Ralf,
> 
> > on the quick I didn't found information about the pin
> > allocation, but I'll read it again in the evening.
> 
> The Card Connections and their Application, page 30 in the English version.
> 
> > If so the card might be broken all the time, it's a gift, or I might
> > have killed it, because I did a bad soldering
> 
> Try a ready made opto-isolated cable from eBay or a dusty computer shop,
> about 5 euro.

I didn't found such a cable for this price. Even the forbidden leaded
solder is more expensive. I hate to solder without Pb. I'll search the
web in the evening, to get a ready build cable for this price.

> If your card is really busted, there is one available on eBay.de right
> now - the price is hovering at 1 euro, but there are five days to go!
> 
> http://cgi.ebay.de/Soundkarte-Terratec-EWX-24-96-/190410934543?cmd=ViewItem&pt=Studioequipment&hash=item2c5560490f
> 
> Cheers!
> 
> Daniel

Wow, this is cool. Thank you very much :). Even if my card isn't busted
I could sync it with the existing for audio :). But, there are still 5
days ... enough time to search for my Ebay account data, but also a lot
(Continue reading)

Daniel James | 30 Jun 2010 11:45
Favicon
Gravatar

Re: Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling

Hi Ralf,

>> Try a ready made opto-isolated cable from eBay or a dusty computer shop,
>> about 5 euro.
> 
> I didn't found such a cable for this price. 

This one is 8.99 euro including delivery:

http://cgi.ebay.de/Midi-Kabel-IN-OUT-THRU-Game-Port-Verl-2070-/300440692869?cmd=ViewItem&pt=Allgemeines_Musikinstrumente_Zubeh%C3%B6r&hash=item45f3a92885

> Referring to the information I guess that USB seems to be the major
> issue.

It would be good to benchmark USB against PCI gameport MIDI. If it makes
an appreciable difference to jitter, this will certainly affect the
design of our future products.

Cheers!

Daniel
Gustin Johnson | 30 Jun 2010 22:14
Picon

Re: Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling

On 10-06-30 03:45 AM, Daniel James wrote:
> Hi Ralf,
> 
>>> Try a ready made opto-isolated cable from eBay or a dusty computer shop,
>>> about 5 euro.
>>
>> I didn't found such a cable for this price. 
> 
> This one is 8.99 euro including delivery:
> 
> http://cgi.ebay.de/Midi-Kabel-IN-OUT-THRU-Game-Port-Verl-2070-/300440692869?cmd=ViewItem&pt=Allgemeines_Musikinstrumente_Zubeh%C3%B6r&hash=item45f3a92885
> 
>> Referring to the information I guess that USB seems to be the major
>> issue.
> 
> It would be good to benchmark USB against PCI gameport MIDI. If it makes
> an appreciable difference to jitter, this will certainly affect the
> design of our future products.
> 
I have benchmarked my RME.  I am trying to find my midisport 2x2, the 1x
midisport has the wrong gender connector on it (I do not use MIDI a lot
so I do not have a plethora of cables and connectors).  I will post my
results when I get them.

_______________________________________________
64studio-users mailing list
64studio-users <at> lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
(Continue reading)

Ralf Mardorf | 1 Jul 2010 10:30

Re: Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling

On Wed, 2010-06-30 at 14:14 -0600, Gustin Johnson wrote:
> On 10-06-30 03:45 AM, Daniel James wrote:
> > Hi Ralf,
> > 
> >>> Try a ready made opto-isolated cable from eBay or a dusty computer shop,
> >>> about 5 euro.
> >>
> >> I didn't found such a cable for this price. 
> > 
> > This one is 8.99 euro including delivery:
> > 
> > http://cgi.ebay.de/Midi-Kabel-IN-OUT-THRU-Game-Port-Verl-2070-/300440692869?cmd=ViewItem&pt=Allgemeines_Musikinstrumente_Zubeh%C3%B6r&hash=item45f3a92885
> > 
> >> Referring to the information I guess that USB seems to be the major
> >> issue.
> > 
> > It would be good to benchmark USB against PCI gameport MIDI. If it makes
> > an appreciable difference to jitter, this will certainly affect the
> > design of our future products.
> > 
> I have benchmarked my RME.  I am trying to find my midisport 2x2, the 1x
> midisport has the wrong gender connector on it (I do not use MIDI a lot
> so I do not have a plethora of cables and connectors).  I will post my
> results when I get them.

Thank you very much :).
Ralf Mardorf | 1 Jul 2010 10:06

Re: Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling

On Wed, 2010-06-30 at 10:45 +0100, Daniel James wrote:
> Hi Ralf,
> 
> >> Try a ready made opto-isolated cable from eBay or a dusty computer shop,
> >> about 5 euro.
> > 
> > I didn't found such a cable for this price. 
> 
> This one is 8.99 euro including delivery:
> 
> http://cgi.ebay.de/Midi-Kabel-IN-OUT-THRU-Game-Port-Verl-2070-/300440692869?cmd=ViewItem&pt=Allgemeines_Musikinstrumente_Zubeh%C3%B6r&hash=item45f3a92885
> 
> > Referring to the information I guess that USB seems to be the major
> > issue.
> 
> It would be good to benchmark USB against PCI gameport MIDI. If it makes
> an appreciable difference to jitter, this will certainly affect the
> design of our future products.
> 
> Cheers!
> 
> Daniel

Hi Daniel :)

thank you. Could it be, that Ebay might have deleted or blocked my
account, because I only did one order in Dec 2004 and my email address
did change?

I don't have the time to read all the lists mails right now and I also
(Continue reading)

Ralf Mardorf | 1 Jul 2010 12:01

Re: Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling

On Wed, 2010-06-30 at 10:45 +0100, Daniel James wrote:
> http://cgi.ebay.de/Midi-Kabel-IN-OUT-THRU-Game-Port-Verl-2070-/300440692869?cmd=ViewItem&pt=Allgemeines_Musikinstrumente_Zubeh%C3%B6r&hash=item45f3a92885

On order!

On Wed, 2010-06-30 at 10:01 +0100, Daniel James wrote: 
> http://cgi.ebay.de/Soundkarte-Terratec-EWX-24-96-/190410934543?cmd=ViewItem&pt=Studioequipment&hash=item2c5560490f

Artikel, für die Sie geboten haben:  Artikelbezeichnung Soundkarte
Terratec EWX 24/96
Restzeit:  4 Tage 4 Stunden [05.07.10 16:24:28 MESZ]
Übersicht:  2 Gebote
Aktuelles Gebot:  EUR 2,00
Ihr Maximalgebot:  EUR 1,50

It was 1,00 €, I offered 1,50 €, then it directly became 2,00 €, hence I
won't waste my time by gambling for this card.

_______________________________________________
64studio-users mailing list
64studio-users <at> lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
Daniel James | 30 Jun 2010 10:52
Favicon
Gravatar

Re: Information wanted regarding to differences between oldish CPUs and modern CPUs regarding to IRQ handling

Hi Hermann,

> Not only regarding to music. This is a concern for pretty much every
> more hardware related thing. Printers, scanners, screen colour correction,
> interfacing to video cameras,.... endless list
> 
> Commercial interest causes things to become smooth for Windows and MacOS.

That hasn't been my experience with Windows 7 at a neighbours' house.
Installed scanners disappear on reboot, the printer driver resets itself
to US Letter paper instead of A4, and the wireless network always drops
the connection after a minute or two.

I think it's really a difference of perception. In the case of the
wireless connection problems, Microsoft's response is that you should
upgrade your router firmware - for a (probably GNU/Linux) router that
works fine with XP and all other OS's. So they take a bug in Windows 7
and redefine it as a router bug - your problem, not theirs. They have
the commercial muscle to force all third party suppliers to bend to
their will, and provide work arounds for the bugs in their product. I
doubt it's much different for third party suppliers in the MacOS market
- do things Apple's way, or not at all.

No GNU/Linux distribution has that amount of influence in the desktop or
laptop market. Some have a certain amount of influence in the server or
embedded markets, but it's much more like a level playing field between
all the parties. So if things get fixed, it's more likely to be because
of a consensus, rather than coercion.

Cheers!
(Continue reading)


Gmane