Jump to content
IGNORED

Altirra 2.70 released


phaeron

Recommended Posts

I don't know if this has been discussed previously...

 

As you might know, I wrote my first 100% assembler game last year using MADS and Altirra. A couple of weeks before ABBUC's deadline, I tried it in real hardware and noticed a little problem: at the intro screen, when I pressed SELECT or OPTION keys to change the configuration, most of the times those options advanced two or three times in the list of possibilities, not just one for the next option as I expected and worked in Altirra. As the 800XL machine I was using was recovered from trash, I thought that those silver keys had problems, maybe some rusty on them than caused a push-release-push action in a single key press. Of course, in my program I had code to verify when one of those keys were pressed and then check for the released state after changing the option on screen, so no continuous changes could happen.

 

No much time ago, a friend and I were playing with Arduino and an oscilloscope, and noticed a bouncing effect when a switch was pressed. That meant that after checking for the press state, we needed to add a small pause before checking for the release. Eureka! That should be happening with silver keys in my 800XL, and on any XL/XE machine as I could test later.

 

My open thought is: Should this electronic bounce effect be emulated in Altirra?

 

  • Like 1
Link to comment
Share on other sites

Altirra Basic V1.50 is appeared to not support STICK() command and possibly few other commands, possibly there is not enough code space to fit in 8K ROM. If Altirra Basic is extend to 16K cartridge space, STICK() and few other commands COULD be supported.

 

In Atari BASIC, PRINT STICK(0) will return joystick data for Joystick port 0 (Inverse result - usually 15 if joystick does not move)

In Altirra BASIC V1.50, PRINT STICK(0) return syntax error.

Link to comment
Share on other sites

Altirra Basic V1.50 is appeared to not support STICK() command and possibly few other commands, possibly there is not enough code space to fit in 8K ROM. If Altirra Basic is extend to 16K cartridge space, STICK() and few other commands COULD be supported.

 

In Atari BASIC, PRINT STICK(0) will return joystick data for Joystick port 0 (Inverse result - usually 15 if joystick does not move)

In Altirra BASIC V1.50, PRINT STICK(0) return syntax error.

 

It does support it -- see attached screenshot. Can you be more specific about the repro conditions?

post-16457-0-79284900-1457757969_thumb.png

Link to comment
Share on other sites

 

It does support it -- see attached screenshot. Can you be more specific about the repro conditions?

Weird! I re-launched Altirra BASIC V1.50 again and it finally worked fine. It may be parser bug but very difficult to be spotted. I will investigate further but it might be very rare race condition.

 

Thank you anyway!

Link to comment
Share on other sites

Probably just a deliberate optimization, but is there another reason why Altirra BASIC tokenizes negative numbers directly into a number whereas Atari BASIC uses unary minus operating on the positive number?

 

I ran across this while doing LOAD/LIST/ENTER some Softside BASIC programs and trying to verify them using the provided SWAT tables. It walks and checksums the tokens, so the checksums didn't match on lines that had negative numbers (for instance, STEP -1 and NN(0)=-1)

 

Altirra BASIC doesn't change the tokens if you LOAD the file from an Atari BASIC save, so the program subtly changes if you re-enter it.

 

Link to comment
Share on other sites

Probably just a deliberate optimization, but is there another reason why Altirra BASIC tokenizes negative numbers directly into a number whereas Atari BASIC uses unary minus operating on the positive number?

 

I ran across this while doing LOAD/LIST/ENTER some Softside BASIC programs and trying to verify them using the provided SWAT tables. It walks and checksums the tokens, so the checksums didn't match on lines that had negative numbers (for instance, STEP -1 and NN(0)=-1)

 

Altirra BASIC doesn't change the tokens if you LOAD the file from an Atari BASIC save, so the program subtly changes if you re-enter it.

 

Yes, this is deliberate. Atari BASIC has a limitation of only allowing one unary minus operator in a row, such that it cannot support the expression --X. However, due to a quirk in its parser, it can parse and execute --1 as a unary minus followed by the constant -1. In order to allow such constructs without the complexity of trying to replicate all of the weirdnesses of Atari BASIC's parser, Altirra BASIC simply always folds the minus sign into the constant whenever possible.

  • Like 1
Link to comment
Share on other sites

Hi Phaeron, feature request if possible...

 

Drag n drop on to the disk explorer....I use opus as a Windows file replacement and the very nice find feature so it would be great ti just be able to d & d to explore a disk.

 

If unwanted, no matter....(if asked for already or pre mentioned by you as not feasible, then my apologies)

 

Cheers

 

Paul...

Edited by Mclaneinc
  • Like 1
Link to comment
Share on other sites

I'm confused then, we're not talking about the Disk Explorer window that comes up when you go to your disk drives list, mount one and then click the arrow > Explore disk?

Although, I see now that there are extension limitations when dragging to the disk explorer window this way.

Link to comment
Share on other sites

Fair question. I assumed Mclaneinc had opened an empty explorer window via Tools->Disk Explorer then attempted to drag and ATR into it. That's what I tried, anyway, although I didn't expect it to work (and it wouldn't be much use anyway if the explorer window already had a disk open, otherwise the ATR dragged into it would just be added to the disk content).

Edited by flashjazzcat
Link to comment
Share on other sites

Sorry folks, I did mean the disk explorer under tools, I'm well aware of the ability to drop files with a right click etc etc but the tools / disk explorer does not support..

 

I'm daft but not that daft...

 

Thanks Jon for spotting the mistake....

Link to comment
Share on other sites

Fair question. I assumed Mclaneinc had opened an empty explorer window via Tools->Disk Explorer then attempted to drag and ATR into it. That's what I tried, anyway, although I didn't expect it to work (and it wouldn't be much use anyway if the explorer window already had a disk open, otherwise the ATR dragged into it would just be added to the disk content).

 

From what I see the way the disk explorer works is totally separate to any in use disk within the emulator so dragging and dropping one would not affect emulation in anyway nor add to the emulated disk content.

Link to comment
Share on other sites

From what I see the way the disk explorer works is totally separate to any in use disk within the emulator...

Depends how you start the explorer. As Panther pointed out (and I didn't know this myself until Avery told me a while ago), you can open the explorer directly on a currently mounted volume via the fly-out menu next to the corresponding disk slot in the Disk drives dialog. This opens the explorer on the ATR mounted in the emulator and with the open button ("...") greyed out.

 

...so dragging and dropping one would not affect emulation in anyway nor add to the emulated disk content.

Well, the functionality of the disk explorer is that a file dragged into it is written to the volume being explored (if the file system is recognized). So you couldn't then add functionality such that dragging an ATR into the window opens said ATR while a volume was currently open in the explorer. You could, however, say that dragging an ATR into an EMPTY explorer window opens the disk image, but since there's no way to close an open volume other than closing the explorer or opening a different ATR, this kind of drag and drop functionality wouldn't work so well as things stand.

Link to comment
Share on other sites

Umm...I had presumed from using it while emulation was running that the disk explorer was a totally separate tool ran just for the explanation of disks..

 

If that's not the case then I've no wish to interrupt emulation in any way and stand happily corrected...

 

I sincerely thought it was all blocked off (hence the separate image browser)...Oh well, you live and learn...

 

Ta Jon...

 

Another case of, it seemed a good idea at the time :)

Edited by Mclaneinc
Link to comment
Share on other sites

Umm...I had presumed from using it while emulation was running that the disk explorer was a totally separate tool ran just for the explanation of disks.

It is separate if you start it from Tools->Disk Explorer. As I mentioned above, there are two ways to launch it. My point is that drag-and-drop adds the dropped file to the open volume, and there's no reason you shouldn't be able to drop a disk image into a disk image. So the problem is how do you make dragging and dropping an ATR into the explorer window open the ATR for editing if there's already a disk open in the explorer. :)

Edited by flashjazzcat
Link to comment
Share on other sites

I'd have thought the same way Phaeron has for either mounting or loading a new image via emulation, right click and dnd which gives a menu option to either mount or replace / boot a new image but in this case asking if you want to mount a new explorer image or not...

 

Saying that my meds are kicking in for pain relief so its likely I'm as understandable as a off UK call centre :)

Link to comment
Share on other sites

My open thought is: Should this electronic bounce effect be emulated in Altirra?

This seems to vary widely between computers. I'd heard about this effect before, but none of the three computers that I have had any measurable bounce effect when monitoring CONSOL.

 

 

I wrote a simple CONSOL monitor, which maps on screen CONSOL register for some CPU cycles (1024 captures, first 960 are displyed). The results in photos:

 

My PAL 800XL:

post-20192-0-77249300-1458183495_thumb.jpg

 

My NTSC 800XL:

post-20192-0-02574200-1458183794_thumb.jpg

 

The bounce effect appeared on both computers, but on my PAL computer it happened about 1 of 10 times, sometimes pressing a key softly, sometimes tapping on it, but always very close to the moment when I pressed the key. On the other side, in my NTSC computer, it happened about half of the times, and had a longer delay.

 

I've attached the monitor. If someone wants to test their REAL Ataris and share the results, great! Just load the XEX using your preferred method (SIO2PC and RespeQt, SIO2SD, ...), then press any of the silver keys and keep it pressed. A symbol will cover the screen. You can see a bounce if some of the chars are not the same. You have to wait a second after the release of the key before you could press any of them again.

testconsol.xex

Link to comment
Share on other sites

http://www.virtualdub.org/beta/Altirra-2.80-test21.zip

http://www.virtualdub.org/beta/Altirra-2.80-test21-src.zip

 

Changes:

  • PORTB/Axlon memory aliasing is fixed; Axlon memory is now separate.
  • A better error is now thrown when Enhanced Deflate is encountered in a .zip file. (Why would you use Enhanced Deflate on a 20K file??)
  • Started putting in a virtual file system (VFS). The immediate benefit of this is that the emulator can now remember paths to items inside of a zip file, whereas previously they would unmount and disappear on next load. Note that this only works if you open the .zip/.gz/.atz file from the emulator; it will not work if you drag from a .zip file in another tool. It also means that you can specify the file inside, i.e. zip://archive.zip!disk_A.atr, zip://archive.zip!disk_B.atr, etc. These paths need to be quoted on the command line due to switch processing. Filenames inside of a .zip are case sensitive.
  • NTSC artifacting partially rewritten: filter kernel shortened slightly to 18 taps and also added an optimization for long runs of solid colors. Should be about a third faster. Tried AVX2, got frustrated with inability to cross lanes.
  • Fixed Unicode issue in the Add Device dialog which was causing "KMK/J?" in one part. No, you don't want to know how RTF handles Unicode.
  • Disk drive emulation partially rewritten on top of device framework. All commands are reimplemented as state machines, write operations now have proper motor on, seek, and rotational delays, and all commands can now be SIO patch accelerated. I ran this through a bunch of DOSes and VAPI disks, but let me know if you see regressions.

Above comments about the Disk Explorer are correct; it handles drag-and-drop of files but not images. I'd have to resolve that conflict somehow. Not sure many people even know about the right-click drop option in the main view.

 

  • Like 5
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...