Welcome, Guest. Please login or register.

Author Topic: PC still playing Amiga catchup  (Read 218186 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show only replies by amigaksi
    • http://www.krishnasoft.com
Re: PC still playing Amiga catchup
« Reply #464 on: June 08, 2009, 07:38:45 PM »
Quote from: Karlos;509635
The 1 second periodicity was only an example. You could trigger it every 10 seconds. What matters is whether the game responds to the 1ms wide pulse whenever it is issued. If it doesn't then the game simply isn't sampling at a rate that guarantees a sample is read within a 1ms window - ie it isn't sampling at 1kHz. By gradually increasing your pulse width to the point where you get a consistent response (eg 9 in 10 pulses trigger the action) then you know you are in the right approximate resolution of the application's sample rate.
...

I do have some source code for games that just poll the joystick without waiting for VBI.  In the case of River-raid, it does not let you fire again until the missile hits its target or is off the screen.

>As for the rest, they could but that still does not demonstrate that any particular game title samples this quickly. You need to actually test with real applications that were written, not software you write purely to demonstrate that it is possible.

They are both useful.  See if they exist in existing applications and to show that it's more accurate to sample at higher rates.

>PS, see my other crazy idea to allow 1kHz sampling an analogue joystick. In case you can't find it, a quick recap:

>Use the X/Y potentiometers to adjust the left/right volume of a simple hardware oscillator running at several kHz that is sampled by the soundcard at 44.1 kHz. Calculate the RMS power for frames of 441 samples (one frame for left and one frame for right) and look up the RMS value in a suitable calibration table to determine X and Y position.

Computing an on-going RMS may slow things down though.  How about, just looking for a max/min value every millisecond or so and using up 4 channels to get a digital joystick out of it.
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show only replies by amigaksi
    • http://www.krishnasoft.com
Re: PC still playing Amiga catchup
« Reply #465 on: June 08, 2009, 07:47:55 PM »
Quote from: Karlos;509632
You can claim it all you like, but that doesn't make it true. It's approximately 558ns. An accurate figure, determined by a high precision scope might record 555, 559. I totally agree with you that it doesn't matter in system since the circuitry will all be running at whatever speed the clock gives, but the claim it is accurate to 558ns is not true at all. You have to quote a margin of error for any real measurement.

...

There's some ppm rating on the crystals but in the general case it's more accurate than even the rating.  I know the NTSC/PAL crystals are pretty solid when it comes to timing since they have an exact formula to work with: 227.5*262.5*60/1.001 = NTSC color burst signal (3579545.4545Hz) and timing based on that should give 558.73ns for Copper.  Are you claiming that TV's are skipping frames once in a while?

>For example, some years ago, Redrumloa was experimenting with underclocking the main oscillator on the motherboard as he observied it was giving a speed up as based on common amiga benchmarking programs where the native chipset wasn't being used for video etc.

There are cases where there's manufacturer defect.  They do use the T=1/f even on PCs when they use the timer to update system time every 55ms or so.
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: PC still playing Amiga catchup
« Reply #466 on: June 08, 2009, 08:37:31 PM »
Quote from: amigaksi;510012

>PS, see my other crazy idea to allow 1kHz sampling an analogue joystick. In case you can't find it, a quick recap:

>Use the X/Y potentiometers to adjust the left/right volume of a simple hardware oscillator running at several kHz that is sampled by the soundcard at 44.1 kHz. Calculate the RMS power for frames of 441 samples (one frame for left and one frame for right) and look up the RMS value in a suitable calibration table to determine X and Y position.

Computing an on-going RMS may slow things down though.  How about, just looking for a max/min value every millisecond or so and using up 4 channels to get a digital joystick out of it.

For a single pot value, doing 441 multiplications, 440 additions (most of which could be optimised using multiply add style instructions) and a square root might take at most a few hundred cycles. You can even get rid of the square root all together and just have the values in your calibration table squared and look up the nearest match. However, even with the square root, on a GHz class machine that's peanuts, you are looking at microseconds. Given that searching through the 441 samples will require as many memory accesses, which are by far the slowest operation in the task for a modern CPU it probably wouldn't be faster.
int p; // A
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: PC still playing Amiga catchup
« Reply #467 on: June 08, 2009, 10:39:14 PM »
Quote from: Karlos;510022
For a single pot value, doing 441 multiplications, 440 additions (most of which could be optimised using multiply add style instructions) and a square root might take at most a few hundred cycles. You can even get rid of the square root all together and just have the values in your calibration table squared and look up the nearest match. However, even with the square root, on a GHz class machine that's peanuts, you are looking at microseconds. Given that searching through the 441 samples will require as many memory accesses, which are by far the slowest operation in the task for a modern CPU it probably wouldn't be faster.


I think encoding the x/y signals in a single channel, while efficient and the "right way" to do it, is overly complex for this application... just have two square wave oscillators, and alter the amplitude depending upon position... the Audio interface I referred to has 10 channels, but even the simplest audio input has two channels... x on left, y on right.. simples ;)

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: PC still playing Amiga catchup
« Reply #468 on: June 08, 2009, 10:49:17 PM »
I wasn't encoding them into a single channel, I was suggesting the attenuation of the output of one mono oscillator separately into left and right (the volume levels for left and right representing representing X and Y respectively) and then analysing the RMS values of each 441 sample frame for left and right independently to infer the X/Y pot values.

The reason for RMS is to calculate a representative value since you'll never get an exact number of oscillator cycles (regardless of waveform shape) in a single frame.

If you are going to go to the trouble of 1kHz sampling of your analogue joystick, there's no point in doing it half arsed, eh?
int p; // A
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: PC still playing Amiga catchup
« Reply #469 on: June 08, 2009, 11:13:38 PM »
Quote from: Karlos;510042
I wasn't encoding them into a single channel, I was suggesting the attenuation of the output of one mono oscillator separately into left and right (the volume levels for left and right representing representing X and Y respectively) and then analysing the RMS values of each 441 sample frame for left and right independently to infer the X/Y pot values.

The reason for RMS is to calculate a representative value since you'll never get an exact number of oscillator cycles (regardless of waveform shape) in a single frame.

If you are going to go to the trouble of 1kHz sampling of your analogue joystick, there's no point in doing it half arsed, eh?


Well... I can't really see the point of a joystick sampling at 1Khz... so it wouldn't make much difference, in reality... :)

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: PC still playing Amiga catchup
« Reply #470 on: June 08, 2009, 11:20:39 PM »
Quote from: bloodline;510045
Well... I can't really see the point of a joystick sampling at 1Khz... so it wouldn't make much difference, in reality... :)


What? Are you insane? :p
int p; // A
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: PC still playing Amiga catchup
« Reply #471 on: June 08, 2009, 11:25:11 PM »
Quote from: Karlos;510047
What? Are you insane? :p


:lol:

Offline cecilia

  • Amiga Snob
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 4875
  • Country: 00
    • Show only replies by cecilia
    • http://cecilia.sawneybean.com/
Re: PC still playing Amiga catchup
« Reply #472 on: June 09, 2009, 12:22:35 AM »
the no CARB diet- no Cheney, Ashcroft, Rumsfeld or Bush.
IFX CD Tutorial
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: PC still playing Amiga catchup
« Reply #473 on: June 09, 2009, 12:27:59 AM »
That was a fine looking machine, to be fair :)

Pity Commodore never thought to market the Amiga comparatively. Idiots.
int p; // A
 

Offline koaftder

  • Hero Member
  • *****
  • Join Date: Apr 2004
  • Posts: 2116
    • Show only replies by koaftder
    • http://koft.net
Re: PC still playing Amiga catchup
« Reply #474 on: June 09, 2009, 01:33:20 AM »


Amiga; "cats up"
 

Offline smerf

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1666
    • Show only replies by smerf
Re: PC still playing Amiga catchup
« Reply #475 on: June 09, 2009, 01:48:34 AM »
Hi,

@Karlos & Amigaski,

I am probably an idiot, but everything I found on joystick polling on the Amiga says that it operates at 1mhz. I looked at schematics, at building boards, etc. etc.etc. even checked my CD32 Schematics, I see 1mhz. Please correct me if I am wrong, also while looking at the schematics I see a diode and cap in circuit with joystick plug, could this possibly be for joystick contact bounce. I could be entirely wrong, but just wanted to see what you would say.

Sitting on a joystick so much fun, just move the sprite by wiggleing your bun

smerf
I have no idea what your talking about, so here is a doggy with a small pancake on his head.

MorphOS is a MAC done a little better
 

Offline persia

  • Hero Member
  • *****
  • Join Date: Sep 2006
  • Posts: 3753
    • Show only replies by persia
Re: PC still playing Amiga catchup
« Reply #476 on: June 09, 2009, 04:00:37 AM »
The world is moving towards more distance between the programs and hardware.  You have several cores each running at 3 GHz, a bus running in the GHz range, USB 2 running in the 100 MHz range, the hardware has evolved to a point it responds faster than a human can react with it.

The speed of the equipment has also eliminated the need for ports that do only one thing, nowadays your USB port can do everything, so you can plug anything from a monitor or printer to a joystick or mouse into them, no more worrying about not having the right port or the right number of ports.  I would never dream of going back to the old days.

Living in 2009 and loving it!
[SIGPIC][/SIGPIC]

What we\'re witnessing is the sad, lonely crowing of that last, doomed cock.
 

Offline DamageX

  • Sr. Member
  • ****
  • Join Date: Jun 2005
  • Posts: 339
    • Show only replies by DamageX
    • http://www.hyakushiki.net/
Re: PC still playing Amiga catchup
« Reply #477 on: June 09, 2009, 06:53:42 AM »
Quote
Because PCs were originally business machines

Originally, they weren't. The first IBM PC shipped with 16KB RAM, a cassette tape interface, and BASIC in ROM. They accidentally failed in the home computer market, and succeeded in the business microcomputer market. They then tried again for the home market, with the PC jr. but failed. The PC jr. didn't really sell until they introduced a proper keyboard and an upgrade module that enabled it to be used for the same stuff that PCs were being used for.
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show only replies by amigaksi
    • http://www.krishnasoft.com
Re: PC still playing Amiga catchup
« Reply #478 on: June 09, 2009, 08:20:14 AM »
Quote from: DamageX;510109
Originally, they weren't. The first IBM PC shipped with 16KB RAM, a cassette tape interface, and BASIC in ROM. They accidentally failed in the home computer market, and succeeded in the business microcomputer market. They then tried again for the home market, with the PC jr. but failed. The PC jr. didn't really sell until they introduced a proper keyboard and an upgrade module that enabled it to be used for the same stuff that PCs were being used for.


Yeah, PC jr failed but IBM PC didn't have the colors, sprites, blitter, sound DACs, etc. and it's price was way too expensive for gaming or for home use.
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline warpdesign

  • Sr. Member
  • ****
  • Join Date: Feb 2008
  • Posts: 256
    • Show only replies by warpdesign
    • http://www.warpdesign.fr
Re: PC still playing Amiga catchup
« Reply #479 from previous page: June 09, 2009, 10:01:59 AM »
Quote

Yeah, PC jr failed but IBM PC didn't have the colors, sprites, blitter, sound DACs, etc. and it's price was way too expensive for gaming or for home use.

Then they tried again with the PC/AT and blew everything away. Welcome to 2009 ;)