Jump to content
IGNORED

Classic99 Updates


Tursi

Recommended Posts

My code to disable the screen looks like this:

 

LI R0,>0182 * Reg 1: 16K, display off, no interrupt,
BL @VWTR * graphics 2, size = 1, mag = 0.

 

Could it have something to do with the else statement in this part of your code? Looks like you're only checking for text mode and not for blank.

 

if (redraw_needed) {
...
}
else {
// we have to redraw the sprites even if the screen didn't change, so that collisions are updated
// as the CPU may have cleared the collision bit
// as long as mode bit 2 is not set, sprites are okay
if ((VDPREG[1] & 0x10) == 0) {
    DrawSprites();
}
}

 

Ah ha! Yes it could... I never tried a case where VDP was not updated between frames while blanking was set! That looks pretty feasible to me, I will correct it!

 

Thank you :)

 

(Tested with your test app - fix will be in the next release).

 

Edited by Tursi
Link to comment
Share on other sites

I have run into a problem with RXB and Classic99

 

Often times when I write a program I use my CALL KEY("P",0,K,S) but Classic99 stores the character in the buffer so the next CALL KEY("",0,K,S) is just ignored.

 

Like in IN THE DARK I had change to this in the game.

 

140 ! KEYS IN Z$=ARROWS OR Ss Dd Xx Ee SPACE ENTER AID Pp

150 Z$=CHR$( 8)&"Ss"&CHR$(9)&"Dd"&CHR$(10)&"Xx"&CHR$(11)&"Ee"&CHR$(32)&CHR$(13)&CHR$(1)&"Pp"

 

200 ! ARROWS OR L,R,D,U,SPACE,ENTER,FCTN7,P,p

210 CALL ONKEY(Z$,0,K,Z)GOTO 370,370,370,410,410,410,450,450,450,510,510,510,580,690,810,1590,1590

 

360 GOTO 200

 

1570 CALL HPUT(24,8,"<PRESS ANY KEY>") :: CALL KEY(0,K,Z) :: IF Z=0 THEN 1570 ELSE RETURN

 

 

1590 ! PAUSE KEY

1600 CALL CLEAR :: CALL HPUT(10,13,"PAUSED!") :: GOSUB 1570 :: GOTO 160

 

In Classic99 I was forced to change 1570 to a normal XB CALL KEY as the below line would refuse to ever execute.

 

1570 CALL HPUT(24,8,"<PRESS ANY KEY>") :: CALL KEY("",0,K,Z) :: RETURN

 

It would just ignore that CALL KEY("",0,K,Z) and act like the same at the first one because of the Classic99 key buffer.

 

Even if I put FOR Z=0 to 1000 :: NEXT Z before the CALL HPUT or CALLK KEY("",0,K,Z) it would just ignore it.

 

100% the key buffer in Classic99 as the issue, but at least I can do a work around.

 

Rich, yours is a bit more complicated... and made more so by assumptions of the underlying architecture. Can you help me out with two questions:

 

What do you mean by the "Classic99 key buffer"? Classic99 doesn't buffer keystrokes. It DOES use Windows key messages though.

 

What is CALL KEY("",0,K,Z) supposed to do.. does it just work like a normal CALL KEY?

 

Link to comment
Share on other sites

Rich, yours is a bit more complicated... and made more so by assumptions of the underlying architecture. Can you help me out with two questions:

 

What do you mean by the "Classic99 key buffer"? Classic99 doesn't buffer keystrokes. It DOES use Windows key messages though.

 

What is CALL KEY("",0,K,Z) supposed to do.. does it just work like a normal CALL KEY?

 

Tursi

 

Well CALL KEY(0,K,S) in normal XB does not check to see what key is pressed it just scans for a key and that is it. Puts that key into K and the Status in S.

 

RXB CALL KEY("string",0,K,S) does the same except in GPL it fetches that string or string variable and does not return to XB until a key in the string is pushed.

Like CALL KEY("P",0,K,S) would ignore all keys except for the P key. (Like a built in IF THEN in the KEY routine)

This is a better replacement for INPUT or ACCEPT as it checks and can not error out. A bonus is it is faster and more compact.

 

Also a bonus is from command line I can do:

>FOR L=1 TO 10 :: CALL KEY(CHR$(13),0,K,S) :: PRINT L :: NEXT L ! This line will not go to the NEXT L till I press ENTER key

(Somewhat like Forth in I can test a routine from command lines)

 

CALL ONKEY("string",0,K,S) GOTO line-numbers

Does not work the same way it checks for a string in the order and goes to the corresponding GOTO line-number, but like normal XB never halts the program.

Like E,S,D,X is in a string example:

10 CALL ONKEY("ESDX",0,K,S) GOTO 200,300,400,500

Line numbers are E=200,S=300,D=400,X=500 so the order of the string has to corrospond to the line number list. Similar to GPL CASE

 

So anyway the issue is a normal XB CALL KEY does not check for what is pressed ever, but RXB CALL KEY and ONKEY do check and that is why when you put two in a row Classic99 sometimes ignores the second one.

It may be a key debounce problem, but that does not seem possible as with a FOR L=1000 :: NEXT L between both CALL KEYs it should fix the problem but does not in Classic99

 

Does this help?

Edited by RXB
Link to comment
Share on other sites

Does this help?

 

A little, but what does CALL KEY("",0,K,Z) do? (ie: with an empty string?) Is it supposed to wait for anything? Or wait for nothing and continue anyway?

 

Key bounce is not likely to cause issues in Classic99 because Windows has filtered the keypresses long before they reach the application.

Link to comment
Share on other sites

A little, but what does CALL KEY("",0,K,Z) do? (ie: with an empty string?) Is it supposed to wait for anything? Or wait for nothing and continue anyway?

 

Key bounce is not likely to cause issues in Classic99 because Windows has filtered the keypresses long before they reach the application.

 

CALL KEY("",0,K,Z)

 

Yes just waits for any keypressed. I wrote it so if a zero string length it just waits.

That way if you use a variable you could use the same CALL KEY(S$,0,K,S) for everything by changing S$.

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

I answered my own question by trying it.. it waits for any key.

 

I ran some tests. I confirm your observations, but I don't think it's the keyboard emulation at fault.

 

Observe this program:

 

100 CALL KEY("P",0,K,Z)
110 PRINT K,Z
120 INPUT A$
130 CALL KEY("",0,K,Z)
140 PRINT K,Z

 

I run the program, and press 'P', releasing it immediately (ie: a normal duration keypress, I don't hold it). It prints 80,1 as expected, then goes to the INPUT prompt.

 

Two important notes happen here:

First, as I have already released P, no characters are echoed into the INPUT.. so this tells me that the emulator has released the key, OR that the INPUT is waiting for a new key. The former seems more likely as we don't normally see lag.

 

For the input, I typed "CBA" and pressed enter. The CALL KEY(""... in line 130 immediately returns, as you noted, but what I find interesting is that it returns 65, for the 'A', and NOT 13 for the Enter. A was clearly released before line 120 was exitted, and the only key that may be down is enter.

 

More telling - try changing line 130 to this:

 

130 CALL KEY("A",0,K,Z)

 

Again, press P to pass line 100, then at the input type CBA and press enter. Note that line 130 WAITS, it does not believe that A is still pressed, like the "" version did.

 

I think you have an issue with something caching the keypresses somewhere else, right now I don't think this is in the emulator. Check the code specific to the empty string version of CALL KEY.

Link to comment
Share on other sites

A really useful feature would be if you could load a list file generated by Asm994a into the Classic99 debugger so you could see your labels and comments in the disassembler view. The code would need to have AORG set and it wouldn't work for self modifying code, but apart from that it doesn't seem to be that difficult to do.

  • Like 1
Link to comment
Share on other sites

Absolutely. I think it is on Tursi's list for a long time. Well you can add it yourself. Tursi does accept patches/enhancements if it fits in the classic99 concept. I provided a small enhancement about 2 years ago. It was the possibility to save/load debugger breakpoints from a file.

 

But yes, that would be a very cool feature. Perhaps it could be in an assembler independent format. Would not mind running a small conversion program as batch that takes the asm994a output and converts it before feeding into classic99. Something like that could perhaps be useful too when using the GNU C compiler target that imsomnia is working on?

Link to comment
Share on other sites

A really useful feature would be if you could load a list file generated by Asm994a into the Classic99 debugger so you could see your labels and comments in the disassembler view. The code would need to have AORG set and it wouldn't work for self modifying code, but apart from that it doesn't seem to be that difficult to do.

 

I think I just had a TIgasm!

Link to comment
Share on other sites

Something like that could perhaps be useful too when using the GNU C compiler target that imsomnia is working on?

 

Some form of cross debugging from host to emulator with gcc would be incredible! That would be reason enough for me to install windows in a VM and run classic99 instead of MESS or ti99sim... I don't know how difficult it would be to allow stepping through a program using breakpoints from within the C file (using gdb, preferably?) but my gut feeling is that this will remain a pipe dream for the foreseeable future :).

Link to comment
Share on other sites

  • 2 weeks later...

I have a strange issues with Classic99 today!!!

 

Downloaded a new copy and same results.

 

When I type the " (Quote mark it is a ~ tilde) even if I hook up other keyboards? Works fine in anything else but Classic99? Ti99Dir is fine also?

 

Anyone have any ideas?

Edited by RXB
Link to comment
Share on other sites

In my experience, the keyboard goes wrong in classic99 approximately once every 5 minutes. It results in keypresses returning the wrong ascii code completely. Pressing ENTER clears the problem. I have a UK keyboard and UK English locale. Not sure if that makes any difference....

Edited by Willsy
Link to comment
Share on other sites

In my experience, the keyboard goes wrong in classic99 approximately once every 5 minutes. It results in keypresses returning the wrong ascii code completely. Pressing ENTER clears the problem. I have a UK keyboard and UK English locale. Not sure if that makes any difference....

 

Nope no good. Rebooting, new install of Classic99 and nothing works. It just started this for no reason at all?

Do not know why it is doing this, checked Keyboard setting in Windows 7 and looked for something that might have done it? Nothing so far works.

Link to comment
Share on other sites

In my experience, the keyboard goes wrong in classic99 approximately once every 5 minutes. It results in keypresses returning the wrong ascii code completely. Pressing ENTER clears the problem. I have a UK keyboard and UK English locale. Not sure if that makes any difference....

 

Well.. that's disappointing, I wish I was aware that your issue is THAT bad. I thought you just got the US keymap! I don't have a good way to test this problem, but suffice to say I type in Classic99 all the time, and I wouldn't just shrug that sort of problem off. :/ Perhaps you should turn off the enhanced keyboard and just use the TI map?

 

Rich, as for your issue, I have no ideas. Classic99 works on key events to the window, when you press quote it gets a single quote and detects the shift key down. That should map to FCTN-P, tilde is FCTN-W. I'd make the same suggestion to you -- try turning off the enhanced keyboard (then you get a TI keymap) and see what that does.

 

To do so, close Classic99, and load the Classic99.ini. Find "ps2keyboard" and set it to 0. Save and close, and then try Classic99. Note you'll have to use the TI key layout at that point!

 

Sorry you guys are having trouble. But Rich, if it changed behavior overnight, that means something on your system changed.

 

Link to comment
Share on other sites

Well.. that's disappointing, I wish I was aware that your issue is THAT bad. I thought you just got the US keymap! I don't have a good way to test this problem, but suffice to say I type in Classic99 all the time, and I wouldn't just shrug that sort of problem off. :/ Perhaps you should turn off the enhanced keyboard and just use the TI map?

 

Rich, as for your issue, I have no ideas. Classic99 works on key events to the window, when you press quote it gets a single quote and detects the shift key down. That should map to FCTN-P, tilde is FCTN-W. I'd make the same suggestion to you -- try turning off the enhanced keyboard (then you get a TI keymap) and see what that does.

 

To do so, close Classic99, and load the Classic99.ini. Find "ps2keyboard" and set it to 0. Save and close, and then try Classic99. Note you'll have to use the TI key layout at that point!

 

Sorry you guys are having trouble. But Rich, if it changed behavior overnight, that means something on your system changed.

 

Ok I did the suggestion of changing the Classi99.ini file and now the Shift keys are disabled.

ps2keyboard=1 the " is a ~

ps2keyborad=0 the Shift keys are dead!

 

My MacPro has no problems running Windows 7/ Windows 8/ XP or Ubuntu.

The only real keyboard problem in Classic99 I have ever had is the Function keys so I keep a USB Window Keyboard plugged in for Classic99.

(Apple threw away the PS2 port back around 2002 in favor of the USB only.)

 

I can try to reload a old Bootcamp instead of the latest greatest upgrade, but other things might break, important things like JAVA or device access.

 

Keep in mind that Apple Book camp and Apple Bios (EFI) is now being copied by EVERYONE as it allows multiple hard drives and no "C" drive needed.

Windows method is CRAP at best like a 1950s mainframe needs a "C" drive to boot, just asinine Microsoft junk.

If the C drive goes down the entire computer is useless. It took Microsoft 3 years to catch Apple for booting on anything other then a hard drive or Floppy.

 

Will get back to you if old Bootcamp broke stuff or fixed the Cassic99 keyboard issue.

Edited by RXB
Link to comment
Share on other sites

Ok I did the suggestion of changing the Classi99.ini file and now the Shift keys are disabled.

ps2keyboard=1 the " is a ~

ps2keyborad=0 the Shift keys are dead!

 

How do you mean they are dead? You mean when you change caps lock, pressing shift doesn't give uppercase letters? Without the PS2 keyboard, you need to press Alt-P to get a quote mark.

 

My MacPro has no problems running Windows 7/ Windows 8/ XP or Ubuntu.

 

I didn't realize you are using a Mac. I can only offer very limited support for Mac compatibility issues, I don't have a Mac.

 

The only real keyboard problem in Classic99 I have ever had is the Function keys so I keep a USB Window Keyboard plugged in for Classic99.

(Apple threw away the PS2 port back around 2002 in favor of the USB only.)

 

USB keyboards are fine. Classic99 doesn't care how the keyboard is connected to the computer. The menu option enables and disables my emulation of my real-world PS2 keyboard adapter, but doesn't make assumptions about what your host computer is using.

 

I can try to reload a old Bootcamp instead of the latest greatest upgrade, but other things might break, important things like JAVA or device access.

 

It changed overnight, I would think you need to find out what changed in that one day. I assume you didn't update everything?

 

If worst comes to worst, there is not much I can do. I can't troubleshoot Mac compatibility issues. I can only offer advice. Classic99 does not do low level access to anything so it's weird that there is so much trouble under emulation layers.

 

 

 

Link to comment
Share on other sites

How do you mean they are dead? You mean when you change caps lock, pressing shift doesn't give uppercase letters? Without the PS2 keyboard, you need to press Alt-P to get a quote mark.

 

 

 

 

 

 

 

 

USB keyboards are fine. Classic99 doesn't care how the keyboard is connected to the computer. The menu option enables and disables my emulation of my real-world PS2 keyboard adapter, but doesn't make assumptions about what your host computer is using.

.

 

OMG thanks ALT P gives me quotes now. Pain in the rear but beats using notepad all the time for a single line. Thanks Tursi!!!!!

 

Yea when I changed ps2keyboard=0 the shift keys just did nothing at all.

 

Yea your Classic99 did not create this issue after some backtracking I found out the new Bootcamp for the Mac is for Windows 8 or Windows 7 but like everything for Windows 8 it messed up Classic99.

 

(I personally have had nothing but hate for Windows 8, drivers crashing, MBR a mess even on its own drive, and a update uninstalled all my games!!!! Windows 8 sucks!!!!)

 

I am at least back up and running, will miss the normal Quotes key, but freaking Bootcamp and Windows 8 strikes again.

  • Like 1
Link to comment
Share on other sites

Yea when I changed ps2keyboard=0 the shift keys just did nothing at all.

 

They should still work for punctuation above the number keys and for upper case letters. You can use Help->Keyboard Map to remind yourself of the original TI keyboard layout.

 

But yeah.. a shame the weirdness is happening. I know Windows Vista changed something in the keyboard interface cause my favorite old hex editor stopped working correctly there, but I've had Classic99 run in Vista, 7 and 8 without noted issues. Of course, I don't know what difference adding bootcamp to the mix might cause.

 

Link to comment
Share on other sites

They should still work for punctuation above the number keys and for upper case letters. You can use Help->Keyboard Map to remind yourself of the original TI keyboard layout.

 

But yeah.. a shame the weirdness is happening. I know Windows Vista changed something in the keyboard interface cause my favorite old hex editor stopped working correctly there, but I've had Classic99 run in Vista, 7 and 8 without noted issues. Of course, I don't know what difference adding bootcamp to the mix might cause.

 

Apple keyboards are mapped for FCTN keys and some others differently. Also Shift Option = ALT or if in Windows Option is mapped ALT so both work.

Print Screen and those keys do not exist in Apple instead we have PAGE UP PAGE DOWN and FCTN, Not to mention Apple has F13 to F19 that a PC does not have.

Link to comment
Share on other sites

Well.. that's disappointing, I wish I was aware that your issue is THAT bad. I thought you just got the US keymap! I don't have a good way to test this problem, but suffice to say I type in Classic99 all the time, and I wouldn't just shrug that sort of problem off. :/ Perhaps you should turn off the enhanced keyboard and just use the TI map?

 

Meh... I can live with it. I really only use a TI (Classic99) for TurboForth, so when the problem occurs it's usually when I'm in the block editor. Like I say, 99% of the time pressing enter fixes it (IIRC Classic99 resets something when Enter is pressed?) and if it's screwed up my source code I can just press FCTN = to exit the editor and lose the changes, re-invoke the editor and I'm off. It's a minor inconvenience to be honest. Classic99 is all about the debugger for me. I would simply be lost (and would have moved away from TI software development completely) without that debugger. I simply would not have the patience to do it any other way. Try writing machine code in Win994A, with nothing but Millers Graphics Explorer to help you when you're stuck! Ewww...

Link to comment
Share on other sites

Speaking of keyboard mappings .... I've got a linux box , and when I use classic99 under wine, naturally I have no copy/paste so I code straight to the emulator, i am quite happy doing that..... however .... when running under normal TI99/4A mode, I kept accidentally pressing, I think was it Minus and Equal down at the same time and it would reset back to the TI splash screen and BEEP .... anyhow this kept happening ... So , I got wise to it, I thought "hey I bet that doesn't happen with the keymapping for the TI99/4 (not 4A) mode .... so I went into the 1979 TI994 mode .... no, it didnt happen , i even tested it .... eventually I started to code a long program, was just about to save and go for coffee, thought I'd add one more line, it involved putting in an exclamation mark .... press shift and hit Q instead !!!! nooooo! ..... BEEEEP

 

I had to come off for the night .... I'd had enough lol !

Link to comment
Share on other sites

Speaking of keyboard mappings .... I've got a linux box , and when I use classic99 under wine, naturally I have no copy/paste so I code straight to the emulator,

 

How's that? Wine supports the windows clipboard just fine, so I'd be surprised if it didn't work. Did you try using the X11 way of doing copy/paste (highlight the text you want to copy and press the middle mouse button/wheel over the location you want to paste it into), or do you use ctrl-c, ctrl-v as in windows?

Link to comment
Share on other sites

How's that? Wine supports the windows clipboard just fine, so I'd be surprised if it didn't work. Did you try using the X11 way of doing copy/paste (highlight the text you want to copy and press the middle mouse button/wheel over the location you want to paste it into), or do you use ctrl-c, ctrl-v as in windows?

 

I have tried that yes, no luck though. Other emulators under Wine do copy/paste as normal, but not Classic.

 

All it does is either move the cursor or put a random character on the TI screen, like an @

Edited by Retrospect
Link to comment
Share on other sites

I have tried that yes, no luck though. Other emulators under Wine do copy/paste as normal, but not Classic. All it does is either move the cursor or put a random character on the TI screen, like an @

 

that's odd. In the basic case, again, I'm not doing anything fancy with the clipboard.

 

But I can't support all the emulation environments out there, I just don't have time. :/ Baffled though I am that they don't work. :)

 

That it put down anything at all means that it succeeded at opening the clipboard and finding text on it. I suppose we could add a ton of debug to figure out what it's glitching on (though I'd rather see Wine fix THEIR bug ;) ).

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