Welcome, Guest. Please login or register.

Author Topic: Is Amiga Emulation better than the real thing?  (Read 70492 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« on: April 24, 2008, 08:52:59 AM »
>I briefly had an Amiga 500 back in 2002, bought it from a guy who owned Amigas and Pegasos machines, it just stopped working...

Everything in this world is subject to birth, death, old age, and disease including your body, your PC emulator, and your Amiga so a dieing Amiga does not make an emulator on a new PC a new Amiga.

>Emulation surpasses the inaccessability to Amiga hardware, there is a limited supply out there. You cannot find a good A500 factory sealed in a box.

So that does not mean that one should get something that is NOT an amiga (from the hardware perspective).  You need to convince some of your hardware pals to build you a REAL amiga.  As an example, try putting an instruction like $009C,$8010 into the copper list and write an interrupt routine (pointed to by location $68) that does something time critical like writing to joystick ports and there your emulator won't work.  The PC timer goes only as accurate as 1.19318Mhz whereas the copper is timing the color clocks at 3.57954525Mhz.

>The question is: Is Amiga Emulation better than the real thing?

No.

>Does it have that original Amiga soul comparable to its hardware counterparts? or is it just a bland Windows executable or binary file that tricks you to thinking that you really have an Amiga?

Souls are only present in living entities-- anything subject to birth, death, old age, disease cannot be a soul.  You are a soul that's why you know you are same person (unchanging identity) throughout your life although your body has changed from when you were a baby.  
As far as tricking, I don't think they are deceiving you since it does emulation on the software level and to some extent hardware (assuming no bugs and real Amiga bugs are emulated), but your Amiga is software+all of the hardware.

>Is Amiga Emulation really modern Amiga Computing since there is no new hardware out from A-inc?

Even if all the Amigas were dead on the planet, the emulator is not an Amiga.  That would just mean the Amiga is extinct.

>Can you integrate Amiga Emulation into the enterprise? Let's say a type shop who prefers Amiga's to Macs?

Amiga emulation is not an Amiga so the question does not apply.

>Give me your thoughts.

You got them.
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« Reply #1 on: April 25, 2008, 03:04:12 AM »
>>    So that does not mean that one should get something that is NOT an amiga (from the hardware perspective). You need to convince some of your hardware pals to build you a REAL amiga. As an example, try putting an instruction like $009C,$8010 into the copper list and write an interrupt routine (pointed to by location $68) that does something time critical like writing to joystick ports and there your emulator won't work. The PC timer goes only as accurate as 1.19318Mhz whereas the copper is timing the color clocks at 3.57954525Mhz.

>Sorry, but your paragraph makes no sense.

You forget to end that line with "to me" as you cannot speak for everyone.

>Of course an Emulator would fully support the Amiga interrupts and memory address space... and I think you'll find far more accurate and fine grained timers on a modern PC than on an Amiga... A typical OS quantum on a PC would be 1000 times every second... on the Amiga it was 12 times...

I don't.  I have the latest PC at 2.8Ghz, it has two timers at 1.19318Mhz and 4096Hz (RTC timer).  Why use terms like "would"?  Why don't you try it out and speak with knowledge rather than guess and assume.  Even if I ASSUME there's some timer at a higher rate, what would be the quantum of the timer after ONE interrupt occurs which does an EOI (Mov AL,20h followed by OUT 20H,AL)?

>Get over it the Amiga is old!!

Sure, it's old but it still contains unique features that modern hardware can't emulate.

>>    Souls are only present in living entities-- anything subject to birth, death, old age, disease cannot be a soul.

>You don't know that. Since you can't define a Soul, my calculator might have one!

You should stop ASSUMING things.  Speak from what you know and don't assume what other people know or don't know.  I have experience that I am the same person but the body has changed and others report to me similar experience.  I don't want to ASSUME calculator has a soul.

>>You are a soul that's why you know you are same person (unchanging identity) throughout your life although your body has changed from when you were a baby.

>Actually that's not true, your current stream of consciousness (i.e. your identity is only defined by your memories) may not even survive a night's sleep!!

Some people remember some things and forget other things but remain the same person.  I know that I use my memory and am separate from my memory.  There are NDE (near death experiences) of people going outside their body and giving accounts of what happens, astral projections, etc. etc.  Perhaps, you need to contemplate that a bit more.

>There are plenty of studies in memory disorders to question the nature of consciousness... But this is not the place for that discussion...

Then you should never have replied as I was not discussing but giving my thoughts that someone asked for.  Now that you have stated your ASSUMPTIONS, you are starting the discussion.

>Is MiniMig an Amiga?

If it does what the real Amiga hardware does, yes.

>You thoughts are odd and erratic!

Ahh, but I don't give a crap about what anyone ASSUMES or THINKs.  I am interested in facts.  
Why don't you try out the CIA interrupt on your real Amiga and fake amiga and see the difference?  Try for example, divisor 11942 for CIA timer at 715909Hz and see the difference and then perhaps you can try out the tougher task of the Copper List based timer events which I was talking about.
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« Reply #2 on: May 02, 2008, 07:02:44 AM »
>...I mean look how long this thread is, about something that is very subjective and personal and not easily quantified...

True in many cases, but some things are not just limited experience of someone but logical deductions or common sense.  I mean if you know the Amiga hardware and the target platform hardware, you can draw certain conclusions without ever having to run an emulator (like in my case).  Processing speed is just one aspect of the computer.  Peripheral I/O speed, timing accuracy, type of ports, etc.  If you wanted to control some external device with parallel signals, obviously an Amiga with a parallel port cannot be emulated (in software) with a machine without a parallel port but only USB, SATA, or other serial-based I/O.
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« Reply #3 on: May 07, 2008, 02:12:19 AM »
Quote:


    amigaksi wrote:
    As an example, try putting an instruction like $009C,$8010 into the copper list and write an interrupt routine (pointed to by location $68) that does something time critical like writing to joystick ports and there your emulator won't work. The PC timer goes only as accurate as 1.19318Mhz whereas the copper is timing the color clocks at 3.57954525Mhz.


>This is weird, because you don't need hi-res timers to do accurate emulation. Usually it's a matter of accurately interleaving CPU- and hardware emulation, not synchronizing emulation to the host hardware.

Depends on what you are emulating.  The case above won't work on your emulator as the frequency of bits being toggled on the joystick port won't be what the emulator will output assuming it even emulates a joystick port.  I like my clocks running at the same speed even on faster CPUs just like the copper sets bits at the same exact color clock on the A500 or A4000 w/higher CPU speed.  [aside: that vector should be $6C for Copper and $68 for CIA timers.]  

>In theory, nothing prevents perfect emulation of the Amiga hardware today, including copper timing.

Nice joke but you should have corrected yourself by now (if you had read all the posts).  It should read "In theory (software-wise), not even an Atari 800 can be perfect emulated what to speak of Amiga."  I just gave a simple example that's not doable although it may seem like it's doing it.  A fake diamond and a real diamond are different in molecular structure/density although they may look the same.  Your emulator cannot be doing timing at 3.579545Mhz if it's timer is only accurate to 1.19318Mhz where reading the tick count itself takes more time than the quantum of the timer.  You may need new hardware graphics card or joystick card when we start discussing writing to overscan areas of the screen, hi-speed reading joystick ports (for periperhals or other reasons), other port emulation, etc.  The Commodore 64 can read a joystick port faster (@ $DC01) than a modern PC (@ 201h).  Here-- I posted this before somewhere on this forum (see if you can get an interrupt to occur consistently on some color clock then we can discuss further):

;*** Test timer accuracy on Atari 400/800 by Krishna Software Inc. without using DLIs.
      TIMERFREQLSB = 53760
      TIMERFREQMSB = 53762
      WSYNC = 54282
      VCOUNT = 54283

      DOSVEC = 10
      CASINI = 2
      WARMSTART = 58484
      VMIRQ = 534   ;hardware irq ptr

      ORG = 600h  
      ;DW 0FFFFh
      ;DW StartAdr
      ;DW LastOffset-1
      DB   0,3   ;# of sectors to load 1..255
      DW   ORG
      DW   StartAdr
      Rts
StartAdr:          Lda       #MyReset,L
      Sta       CASINI
      Lda       #MyReset,H
      Sta       CASINI+1
      Lda        #0
      Sta   580
      Lda       #2
      Sta       9
      Jmp       WARMSTART
MyReset:           Lda       #2
      Sta       9
      Lda       #MyReset,L
      Sta       CASINI
      Lda       #MyReset,H
      Sta       CASINI+1
      Sei
      Lda   #0      ;no VBIs nor DLIs for maximum performance
      Sta   54286
      Sta   53774      ;disable all IRQs
      Sta   54272      ;turn off screen
      Lda       #TimerTwoIRQ,L   ;general IRQ routine but we use only for timer #2
      Sta       VMIRQ
      Lda       #TimerTwoIRQ,H
      Sta       VMIRQ+1
      Lda       #80  ;40 for join channels 3,4; +80 for channels 1+2 @1.79Mhz
      Sta       53768   ;join channels at 1.79 Mhz
      Lda       #165   ;lsb 165
      Sta       53760   ;timer #2 freq = 1789790/[A+1]
      Lda       #116   ;msb for rate divisor A
      Sta       53762
      Lda   #2     ;2=timer interrupt
      Sta       53774       ;enable IRQ #2
NotMidScreen:   Lda   VCOUNT
      Cmp   #65
      Bne   NotMidScreen
      Sta   WSYNC
      Sta       53769   ;start timer counter
      CLI
      Lda       #34
      Sta       54272
IdleLoop:      ;put your code here
      Jmp   IdleLoop

TimerTwoIRQ:          Pha
      Lda   #255
      Sta   53272   ;change register (like color for example)
      Lda       #0   
      Sta       53774
      Lda       #2   
      Sta       53774   ;send ack to timer irq
      Nop
      Nop
      Lda   #96
      Sta   53272   ;change register (like color for example)
      Pla    
      Rti

;LastOffset:   DW 2e0h,2e1h,ORG
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« Reply #4 on: January 21, 2009, 09:59:55 AM »
You replied to this after about 1 year.  I never stated anyting "magical"-- just bare bone facts about hardware differences.  You do need timing to emulate things that rely on it.  Atari 800 has 8 POT counters that increment at exact cycle positions on the scanline; it has a fast pot scan that increments every 558 ns.  A Vcount that increments at exactly 2 scanlines (228 CPU cycles) on an exact cycle consistently.  Atari 800 has an IRQ that can cause an interrupt to occur at exact pixel points on the screen without flickering or diverging.  It has a DLI which can also be stabilized w/o requiring WSYNC register.

Amiga can also use VHPOSR which to emulate by itself requires a 3.58Mhz timer or better.  If I start doing I/O based on Copper timing or even IRQ timing triggered off of Copper, your buffer-based emulators will go bonkers because there won't be any standard PC resources that can do that accuracy (assuming you even have the 1.19Mhz timer availabe since OS usually hogs that up as well).  

Perhaps, you want to wait another 5 years or so before you reply so that there's some chance that more people have HPET timers in their machine and OSes are allowing direct access to their hardware.  
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« Reply #5 on: January 22, 2009, 12:57:57 PM »
>by shoggoth on 2009/1/21 6:53:24

>>You replied to this after about 1 year.

>Yeah. I remembered having this discussion once before and I was right. And you're just as misinformed now as you were one year ago, aparently.

Insults won't help.  Fact help.  Reality doesn't seem to care about your insults; it keeps chugging along according to its laws.  You have been misinformed since 1 year and assumed you are not so you decide to come back.  That's the reality.  

>>I never stated anyting "magical"-- just bare bone facts about hardware differences. You do need timing to emulate things that rely on it. Atari 800 has 8 POT counters that increment at exact cycle positions on the scanline; it has a fast pot scan that increments every 558 ns. A Vcount that increments at exactly 2 scanlines (228 CPU cycles) on an exact cycle consistently. Atari 800 has an IRQ that can cause an interrupt to occur at exact pixel points on the screen without flickering or diverging. It has a DLI which can also be stabilized w/o requiring WSYNC register.

>Nope. You interleave code for each subsystem, and that's what makes it cycle accurate. The internal state of each emulated part is correct in relation to eachother. That's what cycle-accurate means. You don't use timers for that. You're simply misinformed about this.

Sorry, I live in REALITY not your illusory concepts of cycle-accurate.  You are dealing with FAKE time not REAL time so the real/fake jewelry example applies.  Just having some counter for cycles is not same thing as measuring the cycle time.  Eventually you have to map the cycles to real time cycles.  We don't want to experience your fake cycles.  

>Again - this is bull. You don't need high res timers to achieve high res emulation. You seem to think so, but that's not how you do it.

Just read what you wrote-- where's the argument?  All you did was give your opinion.  If I simulate a 10-bit DAC on an OCS Amiga using Volume registers and AUDxDAT, you better get your fake time cycles to correspond to real time cycles else the output will be "bull" as you put it.  That's just one example just to see if you'll insult me or reply logically.
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« Reply #6 on: January 22, 2009, 06:45:43 PM »
>by shoggoth on 2009/1/21 8:09:23

>@amigaski

>I think you confuse "timing" and "timer". Huge difference. You can maintain *timing* for subsystems in relation to eachother without using a *timer*.

I am clear on what I stated and am sticking to it.  I already explained that-- you are just calling it "timing", but it has nothing to do with actual cycle time.  But you can write applications (and many already exist) where this cycle time is measuring actual time.

--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« Reply #7 on: January 23, 2009, 01:22:49 PM »
>by Painkiller on 2009/1/22 14:14:47

>For the countless of hours I have banged my head against the wall with real Amigas I'd say emulators are well worth it.

You mean banged your head for debugging stuff?  There's also the cross compile option that I use for that (and almost instant upload).

>But then again nothing beats the real thing and sadly there isn't PPC emulation in WinUAE.

Agreed-- nothing beats the real thing.  

>I'm hoping that Mac Mini will finally be the new "Amiga" experience for me that will allow me to play old games via emulation and at the same time have a very modern Amiga like OS that doesn't need that much tweaking to get something running.

That's the thing-- you just have to hope it will do whatever experience you are looking for.  I prefer getting things exact and knowing beforehand especially if it involves timing.
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« Reply #8 on: January 23, 2009, 01:43:59 PM »
>by shoggoth on 2009/1/22 8:36:32

amigaksi wrote:
>>I never stated anyting "magical"-- just bare bone facts about hardware differences. You do need timing to emulate things that rely on it. Atari 800 has 8 POT counters that increment at exact cycle positions on the scanline; it has a fast pot scan that increments every 558 ns. A Vcount that increments at exactly 2 scanlines (228 CPU cycles) on an exact cycle consistently. Atari 800 has an IRQ that can cause an interrupt to occur at exact pixel points on the screen without flickering or diverging. It has a DLI which can also be stabilized w/o requiring WSYNC register.

>To emulate this you synchronize emulation to the electron beam. For each pixel, you let the CPU and other subsystems run the corresponding number of cycles with respect to their own clocks. That enables emulation of advanced mid-scanline hardware effects. This is a well known technique and is used in most emulators.

Good so you agee you do need to synchronize emulation to the electron beam.  This translates to having something that can time things at 3.58Mhz or greater.  But you're wrong that it's used in most emulators as there's no way to run the corresponding number of cycles with respect to their own clocks without an accurate timer.  Remember that current processors based on caching, power management, dynamic frequency shifts, etc. can give different cycle counts running the same exact code.

>>Sorry, I live in REALITY not your illusory concepts of cycle-accurate. You are dealing with FAKE time not REAL time so the real/fake jewelry example applies.

>No, that's what cycle accurate means. The state of each subsystem at any given time equals that of a real system given the same number of clock cycles. That's what it means.

If on an Atari 800, I plot a pixel each time the CRT reaches point A, B, C, etc. on the screen, it resolves to a certain frequency.  That frequency will not be the same if you use FAKE time.

>Real time emulation as you describe it have no impact on the actual accuracy of the emulation with respect to the emulated application. You've got that part wrong.

I think we have different definitions of emulation.

>>Just read what you wrote-- where's the argument? All you did was give your opinion. If I simulate a 10-bit DAC on an OCS Amiga using Volume registers and AUDxDAT, you better get your fake time cycles to correspond to real time cycles else the output will be "bull" as you put it. That's just one example just to see if you'll insult me or reply logically.

>Again I've explained this numerous times. Look at the source code of any modern emulator and you'll see.

I don't need to look at any source code to derive a deductive conclusion that if the timing of the PC hardware isn't being used or isn't there for the given accuracy required for an application, the results will be wrong.  If I update the volume registers at 30Khz in the above example, you have two options-- write directly to the hardware at the same rate or patch up the emulator and "understand" what I am up to and buffer up data and introduce a latency.

>About your example. As I've stated earlier, you use code interleaving to achieve synchronisation between the subsystems (in this case the sound hardware and CPU). It's possible to emulate this part perfectly, except for the small delay induced by buffering (which is necessary since computer load varies, both because of the actual emulator and fluctuations caused by other processes).

But your emulator won't buffer up writes to volume registers done via some IRQ/Copper unless it knows the timing of the IRQ/Copper and that it's audio; it would be bufferring up DAC data going to AUDxDat.
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« Reply #9 on: January 23, 2009, 01:47:59 PM »
>by shoggoth on 2009/1/23 3:54:26

Quote:
--------------------------------------------------------------------------------


amigaksi wrote:
I am clear on what I stated and am sticking to it. I already explained that-- you are just calling it "timing", but it has nothing to do with actual cycle time. But you can write applications (and many already exist) where this cycle time is measuring actual time.


--------------------------------------------------------------------------------


>Ok, so what you're claiming is that no matter how accurate an emulator is, you could write an application that can detect that it's not the real deal?

I don't need to do anything special to detect it's the real deal.  For example, if I shift right the VHPOSR by a few bits and add them to some counter and use that counter overflow to draw a pixel on the screen, you won't get the same effect on the emulator unless you have timed the VHPOSR using a real timer.
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« Reply #10 on: January 23, 2009, 02:05:09 PM »
>As long as the VHPOSR and the counter are synchronized to the same clock, then the effect would be the same as on the real hardware, taking your unstated assumption that they are synchronized to the same clock on the real hardware...

Hey, we agreed on something.  Just name the clock or register on the PC that you would use.
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« Reply #11 on: January 25, 2009, 09:09:20 PM »
by bloodline on 2009/1/23 9:13:16

amigaksi wrote:
>>>As long as the VHPOSR and the counter are synchronized to the same clock, then the effect would be the same as on the real hardware, taking your unstated assumption that they are synchronized to the same clock on the real hardware...

>>Hey, we agreed on something. Just name the clock or register on the PC that you would use.

>Given this is a display issue, I would sync it with a virtual electron beam, as Long as the PC can perform all the operations required by the emulator before the real hardware could do it, then by the time of the screen refresh (the point where both the emulator and real hardware interface with the human), the states of the Emulator and the real machine would be identical.

>-Edit- @Chaoslord

If you had the Amiga VBI perfectly synched to PC VBI, than you would be resynching every 1/60 second, but still what happens in between those refreshes will be out of sync given different cycles times.  Usually, PC VBI isn't the same rate as Amiga VBI and PC emulation has the latency to begin with and may also be out of phase.
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« Reply #12 on: January 25, 2009, 09:13:23 PM »
>by ChaosLord on 2009/1/23 9:26:18

>@Amigaski

>I am currently trying to port my game from real Amigas over to WinUAE/UAE/etc.

>One of the things I do is like this:

>IF (UAE) THEN
  // don't bother reading VPOSR on WinUAE. No point.
>ELSE
  // take VPOSR into account when drawing realtime gfx
>END_IF


>Am I doing the correct thing?

I don't program for the UAE platform specifically so I don't know what they are substituting for the VHPOSR register.  In the example, I was using it to time something so it's better to put something in than nothing.
--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« Reply #13 on: January 25, 2009, 09:33:58 PM »
>by shoggoth on 2009/1/23 9:37:31

>>amigaksi wrote:
>>Good so you agee you do need to synchronize emulation to the electron beam. This translates to having something that can time things at 3.58Mhz or greater. But you're wrong that it's used in most emulators as there's no way to run the corresponding number of cycles with respect to their own clocks without an accurate timer. Remember that current processors based on caching, power management, dynamic frequency shifts, etc. can give different cycle counts running the same exact code.

>"Cycles" in this case is the number of cycles the hardware in question would have completed given a particular number of pixels...

>It's like this. You know how many cycles a particular subsystem would complete during e.g. 16 pixels. In case of the CPU, let's say it's 4. Another hypothetical device completes 12 cycles during the same time span...
certain number of cycles for each task. If the granularity is right, the behavior and interaction between the subsystems in the emulator will equal that of their hardware counterparts. You've achieved cycle accuracy in the emulated context.

I agree in the "emulated context" (fake time) you have (basically everything was done in order).  The only problem you would have in the emulated context is if the cycles become fractional for a subsystem.  However, this is not cycle accuracy if the time elapsed makes a difference like in the audio example I gave or even in the VHPOSR if timing adds up to a critical value.

>>If on an Atari 800, I plot a pixel each time the CRT reaches point A, B, C, etc. on the screen, it resolves to a certain frequency. That frequency will not be the same if you use FAKE time.

>In the emulated context - and that's what we're discussing - it'll have the same frequency as the original. The application cannot detect the difference, nor does the user - given that the emulator runs fast enough.

The application cannot detect the difference but user can if the elapsed time for the cycle makes a difference.  You are synching up during refresh but humans can detect much higher frequencies than 60Hz especially for audio and even the 60Hz has latency and may be phase shifted and not exactly 60Hz (which it is not in NTSC).

>I claim that it's possible to emulate an Amiga or a A800 percectly accurate - and the definition of accurate in this case means A: the software can't tell the difference between an emulated machine and a real one, and B: the user perceives the framerate, response time etc. as a real machine.

This is where we differ; user may get close to the real framerate (depends on hardware support), but response time will always have the minimum of 1/60 latency.  And other things will also have latency or be perceived to be different depending on hardware support.

>I suspect that your definition is a comparison in real time - where the emulated machine won't be perfectly in sync with a "real" one at any given moment. Problem is, this is not even true for two "real" machines, given different hardware revisions, CPUs - it's not even true for two identical machines due to clock drifting.

Sorry, but if you do Copper-based, IRQ-based, Audio Intr-based, etc. operations on any Amiga (OCS, ECS, AGA), you are in-sync on a per cycle basis.  Yes, the CPU varies in speed, but your emulation is not just a CPU speed enhancer.  No clock drifting in Copper, IRQs, Audio Interrupts, and other things based on their hardware spec.

>...calculated while another one is being replayed. This causes a slight sound latency, depending on buffer size. Given that the sound emulation catches register changes at a per sample basis, it'll sound like the original. On top of that you can apply filters etc. to mimic analog filters etc. present on the original sound hardware. Faster systems can have a smaller buffer, and hence less latency, naturally.

Latency is always there unless you are doing cycle by cycle emulation in real-time AND your hardware supports similar audio registers to that on the Amiga.  Another problems is that you don't know what the user may modify dynamically so you don't know which registers to buffer up.

>But the emulator will know the timing of the IRQ/Copper and the audio circuitry - in relation to eachother. It doesn't do that by keeping some hardware timer, it does so by keeping track of the cycle count of each subsystem. That cycle count is then synchronized to "real life" by means of throttling, at regular intervals.

If it does not buffer it up, it needs an accurate timer.  If it can guess to buffer up, it has latency.

--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show all replies
    • http://www.krishnasoft.com
Re: Is Amiga Emulation better than the real thing?
« Reply #14 on: January 25, 2009, 09:42:34 PM »
>by ChaosLord on 2009/1/23 9:52:42

>>I claim that it's possible to emulate an Amiga or a A800 percectly accurate

>Of course it is possible. Just because it has never actually happened does not mean that it is not possible.

His definition of emulation is the ATTEMPT to mimic the machine and for it to be accurate all its cycles (using fake time) of various subsystems are in chronological order in right ratios.  Then the "MAGICAL" WM_TIMER will come and put everything in real-time order and you won't notice the difference from the real machine.

>I claim that it is possible to move from point A to point B at 256x the speed of light. Just because it has never actually happened does not mean that it is not possible.

He was taking it out of context; I stated that it's impossible to emulate the Atari/Amiga given the standard PC hardware like 1.19Mhz timer, 2-channel audio card, zero sprites, etc.  Taking your example, traveling from A to B at 256X the speed of light IS impossible using today's rocket.  

Sorry, for the delay in replying but this thread has a latency of 1 year.  
--------
Use PC peripherals with your amiga: http://www.mpdos.com