Jump to content

Photo

Altirra 2.80 released

altirra emulation

659 replies to this topic

#651 snicklin OFFLINE  

snicklin

    River Patroller

  • 2,066 posts
  • Location:Australia

Posted Sat Jul 8, 2017 6:04 PM

Feature request (not critical, just a nice to have):

 

In the Printer Output screen, it'd be nice to be able to do a search for text in a listing.

 

I don't expect anything like replace functionality (which would be a lot less trivial than searching).

 

I would just like to see where in my code that I left a specific string.



#652 moonlight_mile OFFLINE  

moonlight_mile

    Chopper Commander

  • 144 posts

Posted Thu Jul 13, 2017 5:54 PM

I spent the last hour doing searches for this but can up empty.

If I wanted to set up an MIO hard disk in Altirra how can I do that?

I added the mio and hard disk under devices.
I got an mio rom off the Internet and added it
Set the scsi hard disk as D3: in the mio config menu
I left all the other scsi options as default
But I am unable to access it or format it.

Obviously I am missing a step. Any suggestions on what I am missing?

#653 danielcg OFFLINE  

danielcg

    Space Invader

  • 41 posts

Posted Fri Jul 14, 2017 11:41 PM

I found one bug. If I turn on Fast FP (Acceleration), in Atari BASIC, when I type 5^2, it will return incorrect 26. When I type 9^2, it will return incorrect 82. Only certain numbers with power of function will return incorrect answers. If I turn off Fast FP (NO acceleration), power of function will ALWAYS return correct answers. However, I notice speed of power of function is MUCH FASTER with fast FP turned on.

 

Also, Questron game does not support 65C816 processor modes and will freeze as soon after I selected NEW CHARACTER or RESTART CHARACTER menu. Questron game works PERFECTLY when I set processor mode to 6502C. Why Questron game cannot run on 65C816 processor, even at 1.79Mhz speed? Note: Questron game requires Atari BASIC or Altirra BASIC to run.



#654 Shannon OFFLINE  

Shannon

    Born To Be Insane

  • 7,765 posts
  • Pac-man Fever
  • Location:Arcade

Posted Fri Jul 14, 2017 11:44 PM

My guess would be the Questron games use illegal opcodes.



#655 Keatah ONLINE  

Keatah

    Quadrunner

  • 18,927 posts

Posted Sat Jul 15, 2017 12:23 AM

Altirra Basic and Fast FP enabled, 5^2 = 25 and 9^2 = 81

Altirra Basic and Fast FP disabled, 5^2 = 24.9999993 and 9^2 = 80.99999834

 

Altirra Basic cartridge/diskimage also fails this way in other emulators.



#656 phaeron OFFLINE  

phaeron

    River Patroller

  • Topic Starter
  • 2,292 posts
  • Location:USA

Posted Sat Jul 15, 2017 12:54 AM

Atari BASIC has a specific code path to fudge the result for integers, which I'm not interested in reimplementing in Altirra BASIC partly because of this problem: it requires the math pack to be inaccurate in a specific way. The FP acceleration option causes the emulator to intercept math pack calls and evaluate them with the native FPU, which is much more accurate but causes problems in this case. You should not use FP acceleration if you are running a program that is sensitive to the exact values returned by the math pack.
 

Also, Questron game does not support 65C816 processor modes and will freeze as soon after I selected NEW CHARACTER or RESTART CHARACTER menu. Questron game works PERFECTLY when I set processor mode to 6502C. Why Questron game cannot run on 65C816 processor, even at 1.79Mhz speed? Note: Questron game requires Atari BASIC or Altirra BASIC to run.

 

The 65C816 isn't fully compatible with the 6502, and Questron has dodgy programming that causes it to execute garbage instructions that work differently on a 65C816.

 

I spent the last hour doing searches for this but can up empty.

If I wanted to set up an MIO hard disk in Altirra how can I do that?

I added the mio and hard disk under devices.
I got an mio rom off the Internet and added it
Set the scsi hard disk as D3: in the mio config menu
I left all the other scsi options as default
But I am unable to access it or format it.

Obviously I am missing a step. Any suggestions on what I am missing?


Three things:

  • You need a DOS that can access D3:. DOS 2.0S defaults to only supporting two drives.
  • You need a DOS that supports the Parallel Bus Interface. Most do, but you might find an oddball that doesn't.
  • You need Fast Boot disabled, D: acceleration disabled, or the SIO acceleration mode set to PBI. Otherwise, the emulator will intercept the D3: request to speed up the boot process, preventing the MIO from seeing it.


#657 danielcg OFFLINE  

danielcg

    Space Invader

  • 41 posts

Posted Sat Jul 15, 2017 2:06 AM

Thanks! Altirra Basic has better math calculations than Atari Basic, especially when Fast FP acceleration is enabled. I tested Atari BASIC only but not Altirra BASIC. Altirra BASIC has more functions just like BASIC A+ or BASIC XE.



#658 Keatah ONLINE  

Keatah

    Quadrunner

  • 18,927 posts

Posted Sat Jul 15, 2017 2:29 AM

So to get the best answers, use Atari Basic Rev. C with FP ACCEL off.

And for Altirra Basic, turn on the Acceleration.

 

Yes?



#659 dmsc OFFLINE  

dmsc

    Moonsweeper

  • 287 posts
  • Location:Viņa del Mar, Chile

Posted Sat Jul 15, 2017 10:03 AM

Hi,
 

So to get the best answers, use Atari Basic Rev. C with FP ACCEL off.
And for Altirra Basic, turn on the Acceleration.
 
Yes?


No, you should never use Atari Basic if you want the best answers :-P

The problem is that the programmers added a kludge to the power function that detects integer arguments, and in this case takes the integer part and adds 1 to the result. This relies on the math pack always returning less than the true result for the power function!.

In reality, this causes problems if you try to use the power function in any numeric algorithm, as it is now discontinuous and non monotonic, see:

math-err.png

If you are trying to plot the function or use a root-finding algorithm, or calculate the numerical derivative, the result will be really bad.

Altirra Basic does no rounding to the power operation, so the result it gives is the full precision of the math pack, see:

math-atbasic.png

This "looks" worse, but it is actually much better if you plan to use the result on any further calculations.

Note that, with bigger numbers, the results of Atari Basic start to get a lot worse:

bad-pow.png

This should be really 67108864. Altirra Basic gives a better (nearer the expected) result:

atbasic-pow.png

#660 Keatah ONLINE  

Keatah

    Quadrunner

  • 18,927 posts

Posted Sat Jul 15, 2017 12:02 PM

Got it. I'm working on converting a lot of Apple II 2-line basic programs over to Atari. They're graphic demos and use the power function quite a bit.

 

Now I see what's going on.







Also tagged with one or more of these keywords: altirra, emulation

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users