Jump to content
IGNORED

Microchess


xxl

Recommended Posts

11 hours ago, flashjazzcat said:

Unless causing problems with anything third-party is one of your trademark methods. :)

 

Those entry points in Mapping the Atari should never have been published in the first place; the impressionable are encouraged to think they are legitimate calls.

There is no problem, whatsoever, with the vector-tables published in Mapping The Atari. To such a point, in fact, that they clearly state the nature and use of their documented work:

 

"The OS has been considerably rewritten and changed since the 400/800. The ANTIC, PIA, and POKEY chips are the same, but many OS routines have been moved. The vectors in RAM have remained in place for the most part, so software which avails it- self of these locations can run on all machines, Always use the vectors when writing software to use OS routines, never the ac- tual routines themselves; they may change, while the vectors will not."

 

 

 

  • Like 1
Link to comment
Share on other sites

7 hours ago, Faicuai said:

There is no problem, whatsoever, with the vector-tables published in Mapping The Atari. To such a point, in fact, that they clearly state the nature and use of their documented work:

He isn't using the vector table: please don't attempt to misrepresent my point simply in order to perform the usual gainsaying dance. Mapping the Atari lists addresses of arbitrary code locations as if they were entry points. It's no good putting a disclaimer alongside; as we can see, it's easily ignored.

  • Like 1
Link to comment
Share on other sites

2 hours ago, flashjazzcat said:

He isn't using the vector table: please don't attempt to misrepresent my point simply in order to perform the usual gainsaying dance. Mapping the Atari lists addresses of arbitrary code locations as if they were entry points. It's no good putting a disclaimer alongside; as we can see, it's easily ignored.

Even more so as other parts of the Os do not use a vector table, i.e. the math pack. I know it is not really part of theOs, but part of the Basic which was migrated, but this does not improve the situation either.

Link to comment
Share on other sites

1 minute ago, thorfdbg said:

Even more so as other parts of the Os do not use a vector table, i.e. the math pack.

Yes: that math pack is a real cluster, but since it's understood that the entry points are in the middle of the code, reimplementations always keep the entry points the same. It should have had a jump table at the front of the FP pack, but it doesn't.

Link to comment
Share on other sites

Lets not forget the game in all this, coders will be coders, some have a penchant for doing stuff 'their way' which will always rub correct coders up the wrong way, is it deliberate, you take your pick. As a true amatuer coder in the past I was always told to do it by the book because the code was right and it was transferable between OS's. I probably never got in to those regions because of my lack of skill but I understand the process.

 

At the end of the day there's a game there, I care more about if its proper chess than if it works on multi OS's but as with REAL coders like FJC how its done is important, is it going to work on the many devices he so carefully codes (thank you FJC) so he's got every right to quiz the coding but let's not forget the game in all this. I knew some local coders back then who did what they called Q&D or quick and dirty coding and hitting the OS with direct calls rather than the set points outlined, was it gaining anything, I don't know but it just made their stuff OS dependant...A bit silly if you ask me.

Link to comment
Share on other sites

4 hours ago, xxl said:

Nice!!!

 

I don't have any issues with direct OS calls, as long as I know up-front the expected downside or requirements.

 

Here's a special XL-03 load (its core is intact, plus other useful stuff on it) that also provides embedded E: acceleration.

 

AtariOS-800XLXE-Rev03-ULT1M-F1_F4-FP-E.rom

 

The above .obx seems to work well and displays a LOT faster with it. ANTIC can be turned off, on-the-fly with "CTRL+ Inverse", for max. CPU bandwidth.

 

Link to comment
Share on other sites

21 minutes ago, Faicuai said:

Here's a special XL-03 load (its core is intact, plus other useful stuff on it) that also provides embedded E: acceleration.

not working:

 

 

atari000.png

atari001.png

Link to comment
Share on other sites

8 minutes ago, xxl said:

not working:

 

 

atari000.png

atari001.png

 

Very interesting!!!

 

And that seems coming from the embedded E: acceleration... (Hyper E:)

 

I do wonder what triggers it, though (and why on that specific corner)... But whatever it is, it is wrong...

 

Edited by Faicuai
Link to comment
Share on other sites

5 minutes ago, StickJock said:

It's not just that corner.  The entire column is shifted down.  Looks like an off-by-one bug.

 

Correct!

 

And that begs the question where the "h" comes from at the top of that list (that belongs to another "list"... 

 

It is a one-spot off-set on the output... I wonder if that section is being displayed on a different order or sequence than the others?

 

Link to comment
Share on other sites

2 hours ago, Wrathchild said:

A byte saved due to an assumption of the status of the carry post the O/S call:

 

image.png.66360f2a37d4b13be9655894136a6f97.png

Interesting!! (and THX for taking the time to trace this one down...)

 

That seems the code of MiniChess, not the OS-embedded E: accelerator, BTW.

 

So a CLC between $259B and $259E would make it, in order in preparation for the DEC at $259E?

Edited by Faicuai
Link to comment
Share on other sites

In the normal OS the carry is set, so added to the $67 = $68

So the fix would be to use CLC / ADC #$68 or SEC  ADC #$67

 

[Edit] very quite to debug in Altirra,

used memory view at $BC00 to see where the character was located
used "bx write=$bceb" and then looked at the history window

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

3 minutes ago, Wrathchild said:

In the normal OS the carry is set, so added to the $67 = $68

So the fix would be to use CLC / ADC #$68 or SEC  ADC #$67

OK, so. (when I have a little time) I wrap $25A3-$25A7 with custom JSR to pre-set location, and execute carry-setting there with an RTS and see what happens...

 

In any case, the embedded E: accelerator may need to be revised to consider this particular condition and set Carry per oem-OS execution on those specific calls.

 

THANKS for the insight!!!

Link to comment
Share on other sites

The E: accelerator does a good job taking a fifth of the time of the OS PutChar function.

However it too keeps the $F2B0 as a direct entry point rather than updating the table and so could have shaved 3 cycles.

 

image.png.bb6cb36204cca7a2525b8abc07e20da9.png

 

The code after the JMP (that replaces STA ATACHR) is the same and is JMP'd back to and so as this is used it cannot be overwritten however, the new routines are nicely padded and so can be tweaked.

So patching your replacement OS as follows: @ offset ($C)BE7, changed the RTS to SEC/RTS and so the checksum @ ($C0)00/01 then becomes $1C/$0B

 

Whether it should be a guarantee that the routine always returns the Carry set would need more analysis but it does make the right column in the chess program as it was.

 

 

AtariOS-800XLXE-Rev03-ULT1M-F1_F4-FP-E.rom

Edited by Wrathchild
double 'the'
  • Like 3
  • Thanks 1
Link to comment
Share on other sites

On 4/18/2020 at 5:52 PM, a8isa1 said:

- a mistake typing is easy to do.  it's not too diffiucult to restore a piece to its original position by entering another move but only if the piece is still on the board.  please make it possible to restore removed pieces back to the board.  an un-do option would be even better.

added: Load state, Save state 

atari000.png

minichess.atr

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

9 hours ago, Wrathchild said:

@xxl Thanks, I should have gone to bed rather than kept going :D 

 

Here's the revised ROM for @Faicuai then, with the highlighted code inserted so that the return state is more like that of the XL/XE O/S.

 

image.thumb.png.e31363a1764364f4cc551a7f42df71a7.png

AtariOS-800XLXE-Rev03-ULT1M-F1_F4-FP-E.rom 16 kB · 7 downloads

Well, certainly among the finest forensics I have seen in a while, without ever forgetting the rabbits that keep coming out (endlessly) of Phaeron's hat! ?

 

At my current available time (and debugging-know how in Altirra), it could easily take me 24-48 hrs. to nail this down (so KUDOS to you!)

 

There seems to be a redundant / not-needed LDX @  [$CBDF: $A6 $57], as it is immediately replaced by LDX @ [$CBE4: $AE $F0 $02]. Not sure about the following LDA @ $CBE1, assuming that the idea is to also return the expected value on Accum. (?)

 

I have actually evaluated E: performance on all versions, and here are the results (System Information 2.24, DMA=OFF for code-only throughput):

 

1. Rev03 Modified (missing carry-flag state): 609

2. Rev03 Modified (p1: SEC/RTS pair added): 604

3. Rev03 Modified (p2: LDA, CMP, LDX, LDA): 588

 

I also ran tests on two patched versions (p1 and p2) and I could not see any differences on the only (other) troubled title I've found so far, which is CopyMate 3.8, except being p1 faster.

 

So I will stay with p1, which seems right on the mark, and also seems to display teeny-weeny-chess correctly (unless another issue comes up somewhere else, but I doubt it).

 

For those testing these OS loads, consider the following OS-resident 1200XL (dormant) code recovered for XL/XE use (had been already included in these OS-loads, before accel-E: corrections):

 

1. CTRL + {Inverse/Atari} = ANTIC OFF (any other key afterwards turns it back on)

2. SHFT + {Inverse/Atari} = Key audio-feedback ON/OFF

3. CTRL + SHFT+ Caps      = International Character Set on/off (you can try it and see what happens with MiniChess board)

4. CTRL + SHFT + Delete   = Keyboard input ENABLE/DISABLE

5. CTRL + SHFT + Inverse  = HELP key (Incognito ONLY)

 

(EDIT): Here are the builds, for Ultimate and Incognito, per Doc's suggestion (accel-E: change only adds $38 instruction @ CBE7):

 

AtariOS-800XLXE-Rev03-ULT1M-F1_F4-FP-E-p1.rom

AtariOS-800XLXE-Rev03-INCOG-F1_F4_H-FP-E-p1.rom

Edited by Faicuai
Link to comment
Share on other sites

all the file names are the same with the screen accelerator fixes... can we get them edited with different names... version conflicts abound these days...

that and a little note saying what changed and if there was a size change, speed hit/gain as well as ranking. This can become a mess quick or years down the way in the future. As was recently the case in two other projects....

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