Jump to content
IGNORED

Altirra 2.50 Final out


serj

Recommended Posts

Hmmm,

 

60 Bytes left for new command(s) in Altirra Basic ?!? Do a "Super-Poke" that pokes in Data-lines 10x faster than normal ;-) ;-) ;-)

No more "please wait initializing" when running a Basic program with lots of DATA lines. Of course I know this is impossible, but let me dream. ;-)

 

 

Seriously, a BIG thank you for all the fixes and updates of Altirra and Altirra Basic !

Edited by CharlieChaplin
Link to comment
Share on other sites

found a small bug in the emulator.

This small demo program works with sound.

but in Altirra silence.

 

It works under DOS in Altirra.

 

Altirra's XEX loader resets POKEY after loading each segment so the segments near the end of the executable that write directly to POKEY are immediately counteracted:

 

 

...
EXE: Loading program F3B2-17086 to 2000-9CD4
EXE: Loading program 1708B-1708B to D20F-D20F
EXE: Loading program 17090-17098 to D200-D208
EXE: Loading program 1709D-1709E to 02E0-02E1
EXE: Launching at 2000
  • Like 1
Link to comment
Share on other sites

Hi phaeron

 

while I was working on APX- FAMILY BUDGET software, I noticed couple of strange things when working with Atbasic v1.25.

 

When starting the ATR image with Atbasic , the autorun.sys file in the disk loads to DOS directly (no basic).

However, when the auto autorun.sys is loaded via ATARI BASIC rev C, it loads and waits for a key press then continues the loading process.

Also:

When running "BUDGET" file from the ATR image, Atbasic gives an error 129 at line 80. It looks as the error originally occurs at line 55 (error 137).

And since line 55 has trap on error, it goes to line 80 instead of line 100 as it is suppose to.

 

With ATARI BASIC, the "BUDGET" file runs fine.

 

The ATR image is attached if you would like to take a look at.

APX20108.ATR

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

...
EXE: Loading program F3B2-17086 to 2000-9CD4
EXE: Loading program 1708B-1708B to D20F-D20F
EXE: Loading program 17090-17098 to D200-D208
EXE: Loading program 1709D-1709E to 02E0-02E1
EXE: Launching at 2000

 

Yeah... remember folks, don't drink and code.

 

I put that POKEY reset in because there were some programs that depended on it. Here we have an example of a program that depends on this reset NOT happening because the segments are in the last disk sector. Brilliant. Looking at the offsets, this probably won't work on a SpartaDOS disk where the sectors hold 128 data bytes instead of 125. I don't think I'll bother to accommodate something so broken.

 

Hi phaeron

 

while I was working on APX- FAMILY BUDGET software, I noticed couple of strange things when working with Atbasic v1.25.

 

When starting the ATR image with Atbasic , the autorun.sys file in the disk loads to DOS directly (no basic).

However, when the auto autorun.sys is loaded via ATARI BASIC rev C, it loads and waits for a key press then continues the loading process.

Also:

When running "BUDGET" file from the ATR image, Atbasic gives an error 129 at line 80. It looks as the error originally occurs at line 55 (error 137).

And since line 55 has trap on error, it goes to line 80 instead of line 100 as it is suppose to.

 

With ATARI BASIC, the "BUDGET" file runs fine.

 

The ATR image is attached if you would like to take a look at.

 

Well, to start, we have a new winner for worst AUTORUN.SYS BASIC loader:

CIO: IOCB=1, CMD=$03 (open), AUX1=$04, filename="D1:AUTORUN.SYS"
CIO: IOCB=1 (D:), CMD=$07 (get characters), buffer=$1df4, length=$0002
CIO: IOCB=1 (D:), CMD=$07 (get characters), buffer=$15a0, length=$0004
CIO: IOCB=1 (D:), CMD=$07 (get characters), buffer=$0600, length=$0047
CIO: IOCB=1 (D:), CMD=$07 (get characters), buffer=$15a0, length=$0004
CIO: IOCB=1 (D:), CMD=$07 (get characters), buffer=$01fc, length=$0003

0600: A9 12             LDA #$12
0602: 8D 21 03          STA HATABS+7 [$0321]
0605: A9 06             LDA #$06
0607: 8D 22 03          STA HATABS+8 [$0322]
060A: A9 0A             LDA #$0A
060C: 8D 80 06          STA $0680    [$0680]
060F: 4C 69 F3          JMP $F369    [$F369] = $E6

Let's load a segment directly to the top of the stack, and hardcode the location of the E: entry in HATABS, and hardcode all of the OS-B editor entry points! No chance Atari might release a newer OS with different addresses....

 

As for why the error occurs, it's because the program is trying to read a data line from disk with INPUT that exceeds 128 bytes. Adjusted buffer length to 255 bytes to fix... whelp, now I know one case where the bottom of page 6 isn't safe with BASIC.

 

http://www.virtualdub.org/beta/Altirra-2.60-test19.zip

http://www.virtualdub.org/beta/Altirra-2.60-test19-src.zip

 

Also added full screen mode save and fixed the RMARGN regression in AltirraOS.

 

This version of the emulator also fixes XFD files being rewritten as ATR and adds write support for DCM, PRO, and ATX disk image formats. When saving a disk image, the format is chosen by the file filter drop-down. PRO <-> ATX interop is not guaranteed to produce a working disk due to fundamental differences (PRO is not really a proper image format), but in some cases it will work.

atbasic.bin

atbasicx.xex

  • Like 3
Link to comment
Share on other sites

haha... always a pleassure to blame emulators with own bad code... :D (happened to me, too) :D

 

and yes... demo coding works with drink and code while debugging not... :D

 

@Avery

 

any idea while running the debugger I can not enter console keys START/OPTION/SELECT fex.? (F2,etc) (I am not running the latest build). Same when debugging and using cursor keys for Joystick emulation.

Link to comment
Share on other sites

any idea while running the debugger I can not enter console keys START/OPTION/SELECT fex.? (F2,etc) (I am not running the latest build). Same when debugging and using cursor keys for Joystick emulation.

Are you sure you have focus on the atari screen window and not Console/History/Memory etc. window? I already suggested this to you in some other thread or where it was. You can select it by clicking with mouse or press Alt+1.

Link to comment
Share on other sites

most time cursor stays in the debugger console... yeah I know I need to get the focus there... but why? I don't see any reason...

 

you are typing "cont" or "g" in the console and then I need to switch the focus? but not a major issue I was just wondering if there is something I can do.

Link to comment
Share on other sites

As for why the error occurs, it's because the program is trying to read a data line from disk with INPUT that exceeds 128 bytes. Adjusted buffer length to 255 bytes to fix... whelp, now I know one case where the bottom of page 6 isn't safe with BASIC.

 

Yep... I encountered this problem when writing the font converter for the GUI in TBXL. My machine language, banked RAM routine was getting pissed on by a copyright notice line from Adobe in the font file being read/converted.

Link to comment
Share on other sites

Hi Avery,

 

Hate to keep pointing out bugs in such a wonderful emulator, but I just keep finding them. This time, I noticed the Disk Explorer when given a double density Atari dos disk only shows the first 8 files. Attached is an example atr (imaged using AspeQt and a SIO2PC), but it appears to be a general bug. I took a quick look at the code for ATDiskFSDOS2 and nothing obvious jumped out.

games1.zip

Link to comment
Share on other sites

I decided to debug it. The directory sectors are only half used in this disk (probably to make the changes to AtariDOS simple), which matches some old perl code I had for probing atr images. Not sure which is the correct layout, but these changes make the explorer work for this image.

--- src\Altirra\source\diskfsdos2.cpp 2014-11-01 16:59:38.000000000 -0700
+++ src\Altirra\source\diskfsdos2.cpp   2014-11-07 14:28:59.673642200 -0800
@@ -153,15 +153,12 @@
        uint32 fileId = 0;
        uint8 secBuf2[512];
        for(uint32 dirSector = 360; dirSector < 368; ++dirSector) {
-               if (dirSector >= 364 && sectorSize > 128)
-                       break;
-
                if (sectorSize != mpImage->ReadVirtualSector(dirSector, mSectorBuffer, sectorSize)) {
                        fileId += 8;
                        continue;
                }

-               const uint32 dirEntsPerSector = (sectorSize > 128) ? 16 : 8;
+               const uint32 dirEntsPerSector = 8;
                for(uint32 i = 0; i < dirEntsPerSector; ++i, ++fileId) {
                        const uint8 *dirent = mSectorBuffer + 16*i;
                        const uint8 flags = dirent[0];
Link to comment
Share on other sites

Yep... I encountered this problem when writing the font converter for the GUI in TBXL. My machine language, banked RAM routine was getting pissed on by a copyright notice line from Adobe in the font file being read/converted.

 

[Note: I mean the problem with BASIC pissing on Page 6 with INPUT lines over 128 bytes, not any problem with Altirra and it's buffer size.]

Link to comment
Share on other sites

Hmmm,

 

- Atari DOS 2.0s: can read SD & DD; formats SD (but there are several patches available to make it format DD); if your drive can read DD, boot DOS 2.0s and insert a DD formatted diskette, when reading the DIR there may occur an Error the first time, press Reset and read the disk again, it will display the disk directory of that DD disk (have not tried if it also writes to the DD disk, the patched version will write on the DD disk for sure)...

 

- Atari DOS 2.0d: can read SD & DD disks, will format & write in DD...

 

Attached is one version of DOS 2.0s with a DD-patch done by AMDEK (but as said before, DOS 2.0s can at least read DD). We also had a patch available for DOS 2.0s here in Germany for the 1050 Turbo enhancement, to make it read/write/format DD-disks (it was a Basic listing with DATA lines).

DOS20D.zip

Edited by CharlieChaplin
Link to comment
Share on other sites

Double-density DOS 2... yeah, that's a bizarre one. And I could have sworn PUT took an avar instead of an aexp. Fixing that cost four bytes. :razz:

 

http://www.virtualdub.org/beta/Altirra-2.60-test20.zip

http://www.virtualdub.org/beta/Altirra-2.60-test20-src.zip

 

Also, fixed a nasty issue with spurious IRQs reported in the RGB thread. Problem was that some CPU cycle counters didn't have catch-up code and fired a false IRQ after 2^32 cycles with an IRQ pending and IRQs masked. ATX (VAPI) disk image parser has also been rewritten to parse the file format more properly.

 

atbasic.bin

atbasicx.xex

  • Like 4
Link to comment
Share on other sites

Hi Avery,

 

Here is another one.

I just started to use ATbasic, I though now is the time, seeing all bugfixes :-)

Probably a compatibility issue with jumping somewhere into the BASIC-core.

 

Nice work BTW on the extra functions in only 8k!

It there a manual for ATbasic, that I have missed over the thread?

 

First I though it was a MyBIOS-issue, but it's not.....

(Yeah, still coding on that, not easy all those illegal-entries software do use.....)

 

Boot this disk with BASIC enabled.

It will lock-up after the green welcome message-bar.

Typing this in, perhaps I should check HOTEL too.

Another game that needs BASIC. I'll do that in a sec.

 

Grtz!

Sijmen.

Link to comment
Share on other sites

Back!

 

yeah, Hotel has an issue too.

 

You have to be very patient when loading, the intro can't be skipped......

Holding [F1] and a fast PC is very convenient here.

It's a German game and the garbage at the end of the long welcome text is present with Atari-basic too.

(I think this is a residue of the hacked version of this original protected disk)

 

Set up a game, 1 joystick, 2 players, 2 names.

Then you get the screen "gleich geht's los..."

Disk will load some stuff, screen goes black and it stays black.

 

Success with this one.....

Link to comment
Share on other sites

As Russian and as Soviet I say - The Art belongs to people!

 

No less. No more.

 

I never want to steal smth. from authors.

 

But I hate any attempts to cut my ability to take the thing the author bringed to me.

 

May be I'm slightly crazy but I hope that rewrighting of things is some kind of spending the recources.

 

And I know that personalities which like to suck our love to ATARI are alive!

Link to comment
Share on other sites

Probably a compatibility issue with jumping somewhere into the BASIC-core.

 

Nope, more subtle -- it preloads $80-FF from disk and then forces a warm start into BASIC. Altirra BASIC has different page zero usage and blows up. In particular, its second argument stack is not set up properly this way.

 

yeah, Hotel has an issue too.

 

Winners don't use drugs:

$25D9: 160 POKE Q559,Q0: ? "}{1D}{1D}{1D}ENTER";CHR$(34);"D:TEIL3";CHR$(34): ? "{1D}{1D}{1D}CONT": POSITION Q0,Q0: POKE 842,13: STOP  {end $2637}

Someone actually used CONT in production code. :thumbsdown:

 

Could probably find a way to make CONT work, but not sure I have the free space to do it (~100 bytes right now).

 

Link to comment
Share on other sites


$25D9: 160 POKE Q559,Q0: ? "}{1D}{1D}{1D}ENTER";CHR$(34);"D:TEIL3";CHR$(34): ? "{1D}{1D}{1D}CONT": POSITION Q0,Q0: POKE 842,13: STOP  {end $2637}
Someone actually used CONT in production code. :thumbsdown:

 

Could probably find a way to make CONT work, but not sure I have the free space to do it (~100 bytes right now).

 

In Atari BASIC, even if it is not a common technique, you can call it fairly accepted. It is like BASIC self-modifying code: you print the contents of a command or a new program line on the screen, print "CONT" below it, set the cursor above everything, do the POKE, and execute STOP. The cursor starts going down as if the user was pressing the Return key, so it enters the line/command/whatever, then finds the CONT and thus the program restarts itself.

 

It is used in some programs like Graph 3D for example.

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...