Jump to content
IGNORED

Classic99 Updates


Tursi

Recommended Posts

A short glance back, 2 months ... I remembered something ... and now I got TurboPasc'99 working, with WURM etc.

 

I said above that I thought the RAM was initialized with 0. But then ... with the 8-bit memory expansion card in the TI, wasn't it the case that you got a FF00 for each word on first access? That is, the even RAM positions are all FF at startup, and the odd ones are 00?

 

Could someone with a real 8-bit memory expansion please quickly verify that CALL PEEK(-24576,A,B) delivers A=255 and B=0? (or vice versa). I suppose the values of the even addresses are read/written as inverted, while the ones from the odd addresses are directly read/written.

 

So after I implemented that in MESS for the 32kmem component, I was able to run WURM without crash.

Link to comment
Share on other sites

It would be interesting if that were the case -- it would be an artifact of the RAM chips in use, however, and not the circuit doing it on purpose. Remember that the 32k card only sees an 8-bit bus, there is no need for it to differentiate between even and odd addresses. This means that it would need extra circuitry to break out the even and odd addresses and route only half of them through inverters. Very unlikely.

 

In the event that it /is/ an artifact of the RAM chips in use, I am not sure that it should be counted on. Of course, you could argue that this software already does, I suppose, but it would be good to prove that in the software by finding the code in question before declaring it for certain. Classic99 can report reads to uninitialized memory, so that might be a quick test.

 

This would also mean that the software is never expected to function on a warm boot.

 

There are schematics for the 32k card in the Cyc and some of the old hardware manuals. I'll see what I can find for you tonight.

Edited by Tursi
Link to comment
Share on other sites

OK, thanks for looking anyway.

 

It would be even more helpful if there is anyone here who could check this with the real 32K memory expansion on the TI. I cannot test it, since I have a Geneve, which cannot use the 32K.

 

No one here with an original 32K memory expansion?

Link to comment
Share on other sites

A short glance back, 2 months ... I remembered something ... and now I got TurboPasc'99 working, with WURM etc.

 

I said above that I thought the RAM was initialized with 0. But then ... with the 8-bit memory expansion card in the TI, wasn't it the case that you got a FF00 for each word on first access? That is, the even RAM positions are all FF at startup, and the odd ones are 00?

 

Could someone with a real 8-bit memory expansion please quickly verify that CALL PEEK(-24576,A,B) delivers A=255 and B=0? (or vice versa). I suppose the values of the even addresses are read/written as inverted, while the ones from the odd addresses are directly read/written.

 

So after I implemented that in MESS for the 32kmem component, I was able to run WURM without crash.

 

A=255 and B=0 as you suspect, Michael.

 

...lee

Link to comment
Share on other sites

A=255 and B=0 as you suspect, Michael.

 

Yes, this is what I seem to remember. The interesting thing is how this is caused. The 32K memory expansion is organized as sixteen 16K x 1 DRAMs, which calculates as 256 KiBit or 32 KiB. Also, the card has an 8-bit interface, so why should the even addresses be handled unlike the odd ones?

 

Anyway, this solves the problem with the TurboPasc programs that fail to run in the emulators. What I do not remember is whether TurboPasc stopped working on my own machine once I replaced the 8-bit card with the console 32K mod (16bit directly connected). I think this was the time when I switched to c99, never to use Pascal again ...

  • Like 1
Link to comment
Share on other sites

Yes, this is what I seem to remember. The interesting thing is how this is caused. The 32K memory expansion is organized as sixteen 16K x 1 DRAMs, which calculates as 256 KiBit or 32 KiB. Also, the card has an 8-bit interface, so why should the even addresses be handled unlike the odd ones?

 

I'm guessing it's something to do with power-up/initialising of the DRAM controller. I guess it's "brain-dead" for at least a couple of cycles, with it's bus either tri-stated or held high, and crap gets latched into the top 8 bits.

Link to comment
Share on other sites

Back on topic with a new release :)

 

-Added support for DSK.DISKNAME.FILENAME disk access. For FIAD, the foldername is used.

-Nested menus in the User Cart menu

-fix screen redraw on debug activities to VDP

-fix debug character display in bitmap mode

-fix screen color changes from the debugger

-UberGROM simulation/test application (not production quality)

-More F18A GPU improvements, but most special opcodes are not implemented.

-Added CRU support for emulator-unused 9901 bits (fixes Robotron)

 

http://harmlesslion.com/software/classic99

 

F18A GPU opcodes were all updated, specifically:

 

    CALL
   RET
   PUSH
   POP
   SLC
   PIX    (incomplete)
   CSON    (not implemented)
   CSOFF    (not implemented)
   SPIOUT    (not implemented)
   SPIIN    (not implemented)
   RTWP
   disabled known unimplemented 9900 opcodes

 

However, none of them are tested. In particular PIX doesn't support all operations yet, I need to find out what CPU status flags are set by each opcode, and maybe cycle counts (I'm not sure if the rest of the 9900 GPU has the same cycle counts as the real one, though, and Classic99 does not attempt to emulate cycles on the GPU yet).

 

Also, here's an example of nested menus in user cartridges, from the manual:

 

[CartGroups]
Group0=Atari
Group1=Tursi

[Atari0]
name="Pole Position"
ROM0=C|6000|2000|MODS\POLEPOSC.BIN
ROM1=X|6000|2000|MODS\POLEPOSD.BIN

[Tursi0]
name=EPSGMod Example
rom0=G|6000|60C8|MODS\EPSGMODG.BIN

 

Will give you this:

post-12959-0-85339900-1371026236_thumb.jpg

 

Each nested menu supports 100 carts, and you can have 100 menus (if you keep the 'usercart' section, that counts as one). However, the maximum count of cartridges is somewhere around 9000. That top end is theorhetical and not tested. ;)

 

  • Like 2
Link to comment
Share on other sites

Ideas. Clipboard.

 

If the “Paste XB” works (haven't had any problems), how about integrating it into “Paste”. “Paste” should then detect what application is running, and massage the clipboard accordingly before streaming. Applications could then (of course) have individual specialties.

 

I don’t know how it applies to things outside of XB, but how about stripping empty lines and lines starting with ! (exclamation mark) ? I ask because I rather like to add better whitespace and longer comments (at least to my own source), but also want the copy paste actions to be fast.

 

:)

Link to comment
Share on other sites

-More F18A GPU improvements, but most special opcodes are not implemented.

 

Very nice! I already used Classic99's support of the GPU for a demo I hope to release soon-ish. I forgot it had support in there and I was pleasantly surprised when things that the GPU was supposed to be doing were working. I had an "oh yeah!" moment when I remembered you added some initial support. Classic99 also helped me debug the GPU code! Doh!

 

F18A GPU opcodes were all updated, specifically:

 

    CALL
   RET
   PUSH
   POP
   SLC
   PIX    (incomplete)
   CSON    (not implemented)
   CSOFF    (not implemented)
   SPIOUT    (not implemented)
   SPIIN    (not implemented)
   RTWP
   disabled known unimplemented 9900 opcodes

 

I'm not sure the SPI instructions will be necessary. You can emulate access to the SPI-flash by trapping those commands. CSON/OFF are the chip-enable line to the SPI-flash, and I used the CRU opcodes to send/receive bytes to/from the SPI-flash.

 

However, none of them are tested. In particular PIX doesn't support all operations yet, I need to find out what CPU status flags are set by each opcode, and maybe cycle counts (I'm not sure if the rest of the 9900 GPU has the same cycle counts as the real one, though, and Classic99 does not attempt to emulate cycles on the GPU yet).

 

I was not trying to be cycle-accurate with the GPU, especially since it accesses VRAM in 8-byte chunks because I had already implemented the VRAM as 8-bits wide. It is "instruction accurate" though, and I did extensive comparison testing against the real 9900. That's the main reason for having the RTWP instruction, but no BLWP. RTWP gives you access to the status register which I used to make sure I was setting all the flags correctly for each instruction.

 

In the case of the shift, multiply, and divide instructions, they will be much faster than the 9900. The multiply completes the execute state in one clock cycle (10ns), DIV takes sixteen clocks, and the shift instructions take one to sixteen clocks. Keep in mind, this is the "execute" state only, the whole instruction will take extra clocks for the fetch, decode, and store, states.

 

The new instructions will affect the flags with the logic for "all others" (all instructions not specifically specified with special logic) according to the 9900 datasheet.

 

LGT - affected

AGT - affected

EQ - affected

C - not affected

OV - affected by SLC, otherwise not affected

P - not affected

 

If you want suggestions for the next functionality to add, support for the horz and vert scroll registers would be nice, as well as the enhance color modes. I think those have the most visual impact and would help me test my demo. :-)

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

If the “Paste XB” works (haven't had any problems), how about integrating it into “Paste”. “Paste” should then detect what application is running, and massage the clipboard accordingly before streaming. Applications could then (of course) have individual specialties.

 

I don’t know how it applies to things outside of XB, but how about stripping empty lines and lines starting with ! (exclamation mark) ? I ask because I rather like to add better whitespace and longer comments (at least to my own source), but also want the copy paste actions to be fast.

 

Paste XB collapses spaces intelligently, for instance it knows that it is safe to remove spaces after parentheses and colons, as well as all duplicate spaces. It also modifies the running code to allow a longer input line. Because it does so much magic in the background, I want the use of it to be deliberate. Just because XB is running does not mean you want the input mangled and the VDP buffer stretched - what if you are pasting into a running application, or pasting formatted DATA statements? Is there a problem with the two options that can be solved?

 

Stripping blank lines and lines that start with comments instead of a line number for Paste XB is reasonable... I didn't think they added that much time, but I guess a lot of them could. :)

 

  • Like 1
Link to comment
Share on other sites

Paste XB collapses spaces intelligently, for instance it knows that it is safe to remove spaces after parentheses and colons, as well as all duplicate spaces. It also modifies the running code to allow a longer input line. Because it does so much magic in the background, I want the use of it to be deliberate. Just because XB is running does not mean you want the input mangled and the VDP buffer stretched - what if you are pasting into a running application, or pasting formatted DATA statements? Is there a problem with the two options that can be solved?

 

Yes, off course, deliberate use seems a better option.

 

Stripping blank lines and lines that start with comments instead of a line number for Paste XB is reasonable... I didn't think they added that much time, but I guess a lot of them could. :)

 

Yes, maybe not such a big deal. If it’s easy to do, and you think it’s worth it, then I’d appreciate. It just hit me when watching these 400+ lines fly by with more than two thirds of it being empty lines and comments.

 

:)

  • Like 1
Link to comment
Share on other sites

Idea. Menu (and/or shortcuts).

 

I think we’ve talked a bit about this before. When developing for the TI-99/4A, I often find myself reaching out for the mouse every other second. I really miss keyboard shortcuts or at least the ability to activate the menu. As I understand the keys Ctrl and Alt are reserved for use within emulation. Personally I never use them (within emulation), so how about an option, allowing the use of Alt to activate the Classic99 menu ?

 

:)

Edited by sometimes99er
Link to comment
Share on other sites

-fix screen redraw on debug activities to VDP

-fix debug character display in bitmap mode

 

Thank you Tursi, this is great. Now I can see how the scrolling in Parsec was done, for instance, and I can use it for debugging my own code.

 

I also have a wish for Classic99: an easy way to catalog a disk from windows, like in Win994a.

Link to comment
Share on other sites

I also have a wish for Classic99: an easy way to catalog a disk from windows, like in Win994a.

 

I don't know what Win994a does, but to catalog a disk image file from Windows, use TI99Dir. If you associate *.DSK files with TI99Dir, then you can use Disk->DSK1->Open DSK1 in the Classic99 menu to automatically open the current disk image. (If no program is associated with DSK files, then an error will be reported when you select Open, which probably won't make much sense).

 

I assume you are not using the raw files mode, since that already looks like a folder in Windows. :)

 

I go over how to associate the files, if they aren't already, in this thread at my forum: http://harmlesslion.com/hlsup/viewtopic.php?f=3&t=534&p=2311

Link to comment
Share on other sites

If you associate *.DSK files with TI99Dir, then you can use Disk->DSK1->Open DSK1 in the Classic99 menu to automatically open the current disk image.

 

Great, thank you. It was the quotes. I had to edit a registry entry under HKEY_CLASSES_ROOT\dsk_auto_file\shell\open\command to make it work.

Link to comment
Share on other sites

I did a little utility program tonight that can send paste strings to Classic99 from the command line (as well as reset it), so that you can use it in Makefiles to automatically load your programs.

 

It's called classic99paste, but if you look at the included source, it's really simple. It just finds the Classic99 window and sends it a couple of window commands.

 

Usage is really simple. First, launch Classic99, and make sure it's configured for the module you want. For this test, pop into TI BASIC first, then in a command prompt somewhere, run:

 

classic99paste 10 REM Hello this is a paste string\n

 

It supports two switches, if you pass "-reset", it will reset the emulator before running the string. If you pass "-resetOD", it will reset the emulator AND set CPU Overdrive before running the string.

 

I'm using it at the end of a GCC makefile. The end of my makefile looks like this:

 

	$(CP) GROMCF* /cygdrive/c/classic99/dsk1/
/cygdrive/c/work/classic99paste/release/classic99paste -reset "xx25DSK1.GROMCFG\n"

 

The CP command invokes the copy command to copy the output EA#5 files into Classic99's DSK1 folder (I'm using Cygwin, that's why the 'cygdrive' syntax). And the classic99paste runs. That string first resets the emulator, then presses 'xx' (to pass the master title screen - one key gets eaten by the system), '2' to select Editor/Assembler (which I pre-configured), '5' to select 'RUN PROGRAM FILE', and DSK1.GROMCFG and an enter key to start it up. I have to use quotes in Cygwin otherwise it drops the backslash (Windows doesn't do that).

 

Hope someone finds it useful.

 

classic99paste.zip

 

 

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