Jump to content
IGNORED

Classic99 and TI BASIC odd behavior


InfernalKeith

Recommended Posts

20 hours ago, jrhodes said:

You've caught the RXB virus apparently :-D

Hopefully it's just residual memory... you surely wouldn't want to be haunted at night and your bedroom closet opening for no reason... just power off and on and test again..I assume the cleansing with sage will also help if needed..

(I'm not responsible for the content)..

I love legal ease .

  • Like 1
Link to comment
Share on other sites

Keeping in mind that my programming knowledge is an amalgam of 1988-era trial and error, and what I've picked up in the last 15 years in my intermittent attempts to keep up with you all...  I think I had it in my head that the number you typed in CALL FILES (x) didn't matter.  I also did not know about typing NEW and loading after.

 

Having said that, I just tried to run it with CALL FILES 0, 1, and 2.  0 gets the furthest, actually building the game map and starting the game loop before I get a MEMORY FULL.  Attempts to try CALL FILES (1) and (2) led it to bail out before even getting started.

 

Tomorrow I start condensing DATA statements in earnest and looking for other places to scrimp.

Link to comment
Share on other sites

17 hours ago, GDMike said:

Hopefully it's just residual memory... you surely wouldn't want to be haunted at night and your bedroom closet opening for no reason... just power off and on and test again..I assume the cleansing with sage will also help if needed..

(I'm not responsible for the content)..

I love legal ease .

Actually, it reminds me of the bullies at High School as I was the second smallest in school so the jerks thought it was hilarious to stuff me in trash cans or lockers.

You can understand why being bullied by jerks tends to not go over well with me.

 

Perhaps some of you may have been one of those jerks, I know protesting this treatment just made them be more cruel.

I guess it comes down to just EMPATHY and not being a Sociapath.

 

Link to comment
Share on other sites

Here is another example of the misbehavior I mentioned earlier. My folder BUGGYCART has 2 carts in it, CHESS and TMLDEMOL. CHESS has both groms and rom, and TMLDEMOL is a 4 bank rom cartridge.

From a newly started Classic99, (version QI 399.057) when I load CHESS as a user cart, the menu looks as expected. If I then load TMLDEMOL as a user cart, you can see that CHESS is still in the menu, followed by TMLDEMO.

Can someone try this out to see if they get the same results?

CHESS_C.BIN

CHESS_G.BIN

TMLDEMOL-8.BIN

BUGGYCARTS.GIF.6ec5f5388e792c98eb5544d1f3509da7.GIF

 

 

 

 

  • Like 1
Link to comment
Share on other sites

It did this for me also, I selected the Chess game, it showed up fine.  Straight after that I selected the TML Demo and it showed both Chess AND TML demo.

Whilst this behavior should not happen, I did things in reverse and the results were normal behavior.

 

 

 

This suggests to me there is either a bug in the loader OR there's something pretty strange about the format of the TML demo that classic99 doesn't "get on with".  

 

 

 

  • Like 1
Link to comment
Share on other sites

38 minutes ago, Retrospect said:

This suggests to me there is either a bug in the loader OR there's something pretty strange about the format of the TML demo that classic99 doesn't "get on with".

What happens if you select a different GROM/ROM cartridge, then the TML Demo?  Also, I wonder if it matters if the GROM/ROM cart has two menu entries.

  • Like 2
Link to comment
Share on other sites

Recorded my test.  Strange things ARE happening.  This is either the cartridges that are at fault somehow or there's something amiss with Classic99.

In either case I do not know the solution as it is beyond me by several levels, I can only show what is happening.

 

 

 

Link to comment
Share on other sites

5 minutes ago, Retrospect said:

I think this is the thing yes,  I'll do another test, but I don't remember anything untoward happening with "normal" cartridge swapping

Make sure it actually runs. After choosing Video Chess on the menu when TMLDEMO was there, I found that it did not run after getting through the GPL startup screen, which is not surprising because the rom was for TMLDEMO.

  • Like 2
Link to comment
Share on other sites

1 minute ago, senior_falcon said:

Make sure it actually runs. After choosing Video Chess on the menu when TMLDEMO was there, I found that it did not run after getting through the GPL startup screen, which is not surprising because the rom was for TMLDEMO.

I shall re-test and run the programs this time.  Something is amiss here that's for certain.

  • Like 1
Link to comment
Share on other sites

8 minutes ago, senior_falcon said:

After choosing Video Chess on the menu when TMLDEMO was there, I found that it did not run after getting through the GPL startup screen, which is not surprising because the rom was for TMLDEMO.

In my video I managed to run all 4 programs present including TML demo whilst others where present.  This is beyond strange.  Then when I re-selected TML demo AFTER loading up Cattle Battle, TML Demo did not show, it was still cattle battle.

  • Like 1
Link to comment
Share on other sites

33 minutes ago, Retrospect said:

In either case I do not know the solution as it is beyond me by several levels, I can only show what is happening.

I bet in this case, Classic99 is loading BOTH of your CATTLE files, as it expects that any file with same name but a different suffix (8, G, C, D, &c) are part of the same set.  Since each file has its own header, the result is two menu entries.  The debug will probably answer this question.

  • Thanks 1
Link to comment
Share on other sites

17 minutes ago, OLD CS1 said:

The debug will probably answer this question.

Possibly but not for me as I've no clue what anything in the debug means when it shows it.  

 

18 minutes ago, OLD CS1 said:

Classic99 is loading BOTH of your CATTLE files,

This is true.  I still don't know why all four came up though in one of the example instances in the vid.  And 3 of the 4 were able to be selected and played (I didn't test option 1 ti basic admittedly)

Link to comment
Share on other sites

I know everyone wants to help, but when you run away with theories like this, it makes it really hard to get to the actual troubleshooting. ;)

On 4/23/2023 at 8:46 PM, InfernalKeith said:

Keeping in mind that my programming knowledge is an amalgam of 1988-era trial and error, and what I've picked up in the last 15 years in my intermittent attempts to keep up with you all...  I think I had it in my head that the number you typed in CALL FILES (x) didn't matter.  I also did not know about typing NEW and loading after.

 

Having said that, I just tried to run it with CALL FILES 0, 1, and 2.  0 gets the furthest, actually building the game map and starting the game loop before I get a MEMORY FULL.  Attempts to try CALL FILES (1) and (2) led it to bail out before even getting started.

CALL FILES sets the number of disk buffers available to the system - this is the number of simultaneous open files you can have. At startup, it's set to 3. This memory is allocated from VDP RAM.

 

When you execute CALL FILES, the pointer for the top of video memory is updated, but TI BASIC has its own pointers which are NOT. This is why you need to execute 'NEW' after CALL FILES. This is called out in the disk controller manual, IIRC. I don't know if just executing OLD is safe (ie: I don't know if it implicitly does a NEW first).

 

So, CALL FILES(1) leaves the most memory free for TI BASIC for a disk system. CALL FILES(0) is a Classic99 extension, because the Classic99 DSR does not need the video RAM, it only reserves it for compatibility. By allocating no VDP RAM, the system more closely resembles a cassette-only system. However, the resulting file can be tricky to load on real hardware with disks. I know Rich did some work to make RXB work with CALL FILES(0) on real hardware, plus of course XB can use memory expansion, so is less reliant on VDP RAM.

 

The question becomes, if you use the NEW before loading, do the symptoms still occur?

 

  • Like 1
Link to comment
Share on other sites

I love that over 14 messages testing the loader nobody went Edit->Debugger and read what it loaded. ;)

 

@OLD CS1 is correct. Classic99 will load /all/ possible files changing only the final letter extension when you ask it to automatically load. There's no way for it to know not to. I don't know where 'CATTLE' came from though, so I can't talk about that. But remember that if the files are loading to the same place in memory, then some will overwrite others. ;)

 

Since I've only got files to test Senior Falcon's example, let me run that now...

 

Link to comment
Share on other sites

Okay, loading Chess:

 

Loading file (D:\new\x\CHESS_C.BIN) from disk: Type C, Bank 0, Address 0x6000, Length 0x2000
Loading file (D:\new\x\CHESS_G.BIN) from disk: Type G, Bank 0, Address 0x6000, Length 0x9800

 

I mean... this is English, right? It is that hard to understand?

 

Then loading TML-DEMO:

Loading file (D:\new\x\TMLDEMOL-8.BIN) from disk: Type 8, Bank 0, Address 0x0000, Length 0x8000
Loaded 32768 bytes, non-inverted, bank mask 0x3
Loading file (D:\new\x\CHESS_G.BIN) from disk: Type G, Bank 0, Address 0x6000, Length 0x9800

 

And at this point the bug is confirmed. We're done without running in circles for hours? I'm not trying to be nasty, but this is why the debug is there in the first place.

 

It looks like Classic99 isn't resetting the count of auto-detected ROMs when it loads, and somehow we've not run into it in all this time. ;) I'll go ahead and push out a service release.

 

Edit: Just to break down the debug a bit - the first part is human readable - you can see /exactly/ what Classic99 loaded. (All the built-in ROMs are listed in the debug at the same time). The important bit here is WHICH files, and sometimes, in WHAT ORDER (important if they overlap).

The numbers are there because Classic99 had to /guess/ all those values. When something weird happens, you the human programmer are expected to be able to determine if it guessed right. The 'type' comes right out of the filename, except for the recent stint of no-tag files which are assumed to be 8. Bank applies to banked ROMs that don't start at 0 (mostly old-style XB C/D files), Address is what address the ROM loads to, usually 0x6000 for a cartridge (ROM or GROM), and the length is how long the data loaded is - it should normally match the length of the file. There will be extra lines if Classic99 sees anything it thinks might cause issues with real hardware that it auto-fixes.

This is why I say you can use the debug log all the time. It tells you what assumptions the emulator made and what beliefs it is running with. There's no need to guess at 90% of these issues. :)

 

Edited by Tursi
  • Like 2
  • Thanks 1
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...