Jump to content
IGNORED

classic99 questions


dhe

Recommended Posts

(found the Classic99 thread, thanks :)  )

-----------------

 

coming from here...

 

https://atariage.com/forums/topic/330571-mame-and-tipi-integration/?do=findComment&comment=4995057

grafik.thumb.png.01e28fdfa29f11e0a7851a75690e22c3.png

 

 

...I have 3 questions :)


imagine using

1. FIAD

2. TI-Controller (.DSK)

3. Image (.DSK)


When working with and writing to a .DSK (or a FIAD/Tifiles), not beeing flushed meanwhile, as you say,

what happens if I do a reset inside Classic99 (or change the cartridge or so), or if I just press the X and close the Classic99,

does it flush (=save) my work at this point ?


What is a defined way to say "flush" to the emulator ?

 

thx


?‍☠️

 

 

Link to comment
Share on other sites

"Classic99 updates" is the main thread.

 

Classic99 should flush files if you reset or close the emulation. However, if you intend to count on that behaviour, I will waggle my finger at you, write you out of my will, and suggest that you /prove/ it works before relying on it. (Since the debugger view of the debug log will scroll off the top of the window during the operations, use an external debug viewer to review what the emulator does in those cases: https://docs.microsoft.com/en-us/sysinternals/downloads/debugview )

 

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

I see that Classic99 has the p-code option (using latest version QI399.054).  Wanting to learn this i started messing around with it.  I have a couple of questions:

 

1. I have noticed an issue when trying to prepare a disk for use in the PSYSTEM environment.

 

I have a new disk image I have created with ti99dir as DS/SD and inserted this into DSK1

Executed DFORMAT from DSK3 and selected DS/SD @ 40 tracks in device #4 (DSK1).

 

Select Y to format and I immediately get the below error:

 

"ERROR - Could not find diskette/unit."

 

I have also tried a SS/SD and DS/DD with the same results.  Is there something I am doing wrong within Classic99 or did I find a bug?  The same works fine in MAME.

 

2. I know in Basic and XB I can list a program to CLIP like LIST "CLIP" and it will go to my clipboard.  

 

Is there something similar for doing that with the pcode environment?

 

Thanks,

 

 

 

Edited by Shift838
Link to comment
Share on other sites

On 2/2/2022 at 12:01 PM, Ed in SoDak said:

@Schmitzi The Real McCoy!

 

 

Lee and I are working on Assembly support for sprite routines for RXB 2022 so when done I will send a package.

As for 2021 it was supposed to be a BETA and hope was people would report  bugs.

So far one has been found but oddly can not find what is causing it in Floating Point?

Link to comment
Share on other sites

4 hours ago, Shift838 said:

I see that Classic99 has the p-code option (using latest version QI399.054).  Wanting to learn this i started messing around with it.  I have a couple of questions:

 

1. I have noticed an issue when trying to prepare a disk for use in the PSYSTEM environment.

 

I have a new disk image I have created with ti99dir as DS/SD and inserted this into DSK1

Executed DFORMAT from DSK3 and selected DS/SD @ 40 tracks in device #4 (DSK1).

 

Select Y to format and I immediately get the below error:

"ERROR - Could not find diskette/unit."

 

I have also tried a SS/SD and DS/DD with the same results.  Is there something I am doing wrong within Classic99 or did I find a bug?  The same works fine in MAME.

 

2. I know in Basic and XB I can list a program to CLIP like LIST "CLIP" and it will go to my clipboard.  

 

Is there something similar for doing that with the pcode environment?

What does the debug log say on the disk error? 

 

The way Classic99 and MAME approach the disk system is completely different.

 

I don't actually know how to use the pCode system - I need to go through tutorials just to prove the basics work. So I don't even know what it tries to do when you ask it to format. But it seems likely that it's asking the disk controller to format the disk - and disk formatting is not supported in Classic99. The debug log should state that if so. It does return an error code to the system, but perhaps the psystem doesn't expect that function to be unsupported.

 

I had reluctance to implement functions that could blow away existing data, so DELETE and FORMAT aren't implemented. (FORMAT makes no sense on the main disk interface in Classic99 anyway, but I guess it does for images. Although it's just going to be writing a bunch of zeros to a file...)

 

CLIP is a first class device - think of it as a PEB card. So "CLIP" is exactly the same as "RS232", "PIO", "TP", "DSK1", etc... I guess question 2 just comes down to whether the p-system can access arbitrary devices?

 

Link to comment
Share on other sites

49 minutes ago, Tursi said:

What does the debug log say on the disk error? 

 

The way Classic99 and MAME approach the disk system is completely different.

 

I don't actually know how to use the pCode system - I need to go through tutorials just to prove the basics work. So I don't even know what it tries to do when you ask it to format. But it seems likely that it's asking the disk controller to format the disk - and disk formatting is not supported in Classic99. The debug log should state that if so. It does return an error code to the system, but perhaps the psystem doesn't expect that function to be unsupported.

 

I had reluctance to implement functions that could blow away existing data, so DELETE and FORMAT aren't implemented. (FORMAT makes no sense on the main disk interface in Classic99 anyway, but I guess it does for images. Although it's just going to be writing a bunch of zeros to a file...)

 

CLIP is a first class device - think of it as a PEB card. So "CLIP" is exactly the same as "RS232", "PIO", "TP", "DSK1", etc... I guess question 2 just comes down to whether the p-system can access arbitrary devices?

 

That makes sense since Classic99 does not support formatting.

 

The error i see on the debugger is:

 

SBRLNK call to invalid drive 17

 

From what I understand is that the UCSD psystem creates a PASCAL file in DIS/FIX 128 based on the size you have selected for format.  The PSYSTEM then stories its files within the file itself.  @apersson850 could probably shed more light on exactly what it is doing.

Link to comment
Share on other sites

The p-system supports two kinds of devices, character and blocked. Character devices are things like the keyboard, display and RS232 ports. They all send/receive one character at a time.

Blocked devices are storage devices. They are expected to send/receive one block, 512 bytes, in each transmission. For disks, one block converts to two sectors.

The p-system applies its own directory structure, which it stores in blocks 2-5 on a disk. To access the disk, it uses the sector read/write subprogram on the disk controller. The first two blocks, four sectors, aren't used by the p-system. In some machines, a bootloader is stored here, to allow the system to start on power on. That's not needed for the p-system, since it has the bootloader on the p-code card.

Parts of the p-code card acts like a ROMdisk. Access is of course different compared to reading a disk in a drive. To handle this, the p-system has different blocked device drivers in the BIOS for real disks and the p-code card. Or the tape recorder, for that matter.

The p-system then has a table of 32 units that are available for I/O in the system. For units #4, #5 and #9, there are pointers to the BIOS driver for diskettes. Unit #14 points to the driver for the ROMdisk on the p-code card. #1 and #2 are used for the keyboard and screen, which aren't blocked and have different drivers in the BIOS.

 

So the p-system itself uses nothing but the sector read/write subprogram, which it expects to find on the disk controller.

The utility program dformat is another thing. It's written by TI to give you an opportunity to format a disk without leaving the p-system. It has some way, probably some assembly code, to access the formatting subprogram on the disk controller. It also has a bug, in which it can't format doulbe sided disks, although it claims it can.

Note that after formatting the disk, the p-system's directory has to be installed. If the disk is already formatted, for use with BASIC or whatever, the install of the directory is the only thing needed. It's done by the Filer's Zero command. So in an emulator, which always have a working "disk" available for you, that's all you need.

Another important thing to remember is that the p-system knows nothing about the standard file system. It never uses it. The file PASCAL, which is created on a disk, is just to mark the disk as used to the standard operating system. It's a filler which has no purpose for the p-system. P-system file handling does not occur inside that file.

 

Another complication here is that you can't just like that use different disk controllers. The standard p-system can only know about one controller, the standard disk controller. All disks maps to the same controller. Hence the trick to have a separate RAMdisk controller at CRU 1000H, which is found before the disk controller at 1100H, doesn't work, since all disks must be accessed via the same controller.

To get around that, you have to patch new pointers into the system's table of IO units, and provide new BIOS pointers to the DSR for the additional controller. If you do that, you can have both physical disks and more than one RAMdisk, which all have different CRU base addresses. But then we are way beyond beginner level...

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

20 hours ago, apersson850 said:

To get around that, you have to patch new pointers into the system's table of IO units, and provide new BIOS pointers to the DSR for the additional controller. If you do that, you can have both physical disks and more than one RAMdisk, which all have different CRU base addresses. But then we are way beyond beginner level...

Do you have any documentation on this? Even if just academic at this point, it'd be interesting to understand better how that's laid out.

 

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