Jump to content
IGNORED

Supernotes


GDMike

Recommended Posts

A small issue on the IMPORT from Classic99. So I just fixed. If you want the new update...it's here

 

The problem was that IF by chance you were on the FIRST page and NEVER paged up or down prior to import from classic99 clipboard andand attempt from classic 99 clipboard import was selected then the program would BLACKEN the screen.

The import succeeded BUT a user may not know to page up to page 2 and back to page 1 again to see that it was successful and then the screen straightened out. But its ok now...

 

 

SNP

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

SNP Ver 2.0 is complete. Here it is. and the Help docs.

Ill be working on SNP 3.0 (Database  version)

to load the help, Start SNP (editor assembler option 3, DSK#.SNP  SNP FOR PROGRAM NAME

Once in SNP, press F5, command line. Enter LOAD DSK#.SNPDOCS

 

FIXED the DATE issue

SNPDOCS.rar

 

Edited by GDMike
  • Like 2
Link to comment
Share on other sites

Now I've opened up the space of >6000->7FFF

For the database I've been wanting.

 

I did this because, SNP already has everything needed for the user to create a screen layout, like, where the fields can be placed and the labels for those Fields.

 

Another reason is because the way SNP does it's filing, by grabbing all of left over banks and saves it.

So basically I can leave my filing alone too.

 

The supercart space is what I needed for program space, around 8K, so surely I can squeeze it in, right?

Edited by GDMike
Link to comment
Share on other sites

I did find another error or 2 .. nothing major..

 

The window isn't large enough when you press F5 and call color because you can't see the message, do you want this to be global? Unless the screen is almost empty already, but not good if you have a full screen of data. 

I'll work on fixing that.

I also found an error that if you press ctrl q for date time display active.

Seems that once you turn off the time/date by toggle ctrl q again, the screen saver<SS> status message on the upper part of the screen doesn't get placement again.

I'll work on these. As my test computer has not been able to receive Internet, but once I tried it at home I saw it..

Edited by GDMike
Link to comment
Share on other sites

I've lost the screen blank out in SNP. 

I'm looking at the debugger in classic 99 and I see the address>83D6 suspends counting as soon as SNP boots. Other programs seem to continue counting at this address, per debugger.

Im not seeing anything that's writing to it so I'm stumped as to what's going on, but the screen never blanks out.

I do have a routine that counts cursor blinks that I can use to create my own blank out (screen saver with text that moves around the screen), if I want. 

I always thought that the only way that the screen blanker resets was by a key press OR changing a value at that address.

I also tried pushing a 02 to that address in hoping to force a count, but I'm thinking that's not the right approach, being that, according to the text below, a value at >83D4 is retrieved.

Additional information..

 

Blanking the screen

The ISR increments by two the word at >83D6. If it becomes zero, the ISR uses a copy of VDP register 1 stored in byte >83D4, sets the INT bit (>20) to ensure that further VDP interupts will be generated, clears the SCR bit (>40) and writes that byte to VDP register 1, which results in turning the screen off.

Note that the word at >83D6 is incremented by two, therefore if it contains an odd value it will never reach zero and the screen will never be blanked. Placing >0000 it that word ensures the longer delay before blanking the screen (it requires 32768 calls to the ISR, which takes about 9 minutes), whereas >FFFE turns the screen off at the next interrupt.

 

 

Edited by GDMike
Link to comment
Share on other sites

You have probably turned interrupts off in your code.

The standard technique is to have interrupts off most of the time (because the TI ISR may try to write to VDP "at the same time' as your code) and briefly enable them before disabling them again.

 

A good place to do this is in your keyboard scanning logic where you scan for a key and then work out what to do with that keypress (if any).

 

Just add :

 

LIMI 2

LIMI 0

 

into the loop, and that should fix it.

  • Like 1
Link to comment
Share on other sites

1 hour ago, Willsy said:

You have probably turned interrupts off in your code.

The standard technique is to have interrupts off most of the time (because the TI ISR may try to write to VDP "at the same time' as your code) and briefly enable them before disabling them again.

 

A good place to do this is in your keyboard scanning logic where you scan for a key and then work out what to do with that keypress (if any).

 

Just add :

 

LIMI 2

LIMI 0

 

into the loop, and that should fix it.

At certain kscans I do indeed have limi 2, limi 0, but in areas I don't want a user to exit on accident, I don't. So I'm glad you cleared that up for me.

I'll just go ahead and make my own screen saver then, I'm already counting cursor blinks for my auto save routine and actually, I don't need the auto save doing a screen save for the user anyway, as that was a carry over from the SNE program, I'll remove that, but add a screen save. Note, that when a user fowards a screen Page or goes back a page, or does a GOTO, a screen Page is saved. So I won't miss the auto saver 

 

I couldn't figure out what the heck was happening with that screen blanker. Gees, ok, well I really need to attend a class on 9901 interrupts. I forgot when the next class was again??.....

 

Edited by GDMike
Link to comment
Share on other sites

1 hour ago, HOME AUTOMATION said:

That would also enable the QUIT routine.  A bit of a conflict of interests.

...Besides, it's fun to do it for yourself.:cool:

 

The QUIT routine can be disabled by ORing >1000 with >83C2 (ISR's R1). ORing >8000 at that location turns off QUIT as well as sprite motion and auto sound.

 

...lee

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

3 minutes ago, Lee Stewart said:

 

The QUIT routine can be disabled by ORing >1000 with >83C2 (ISR's R1). ORing >8000 at that location turns off QUIT as well as sprite motion and auto sound.

 

...lee

That's fine. Good to know.

but looks like I'll just do some cleaning and come up with a screensaver in exchange of the deleted routines space.

Link to comment
Share on other sites

My screen saver routine now works again. Kicking in at 9:07 on my last few tests, but I'll test on real HW this next week.

I'm using my cursor counter routine since I can't find the limi 2 anywhere that maybe stopping my actual screen blanker. I've looked Everywhere , all my kscans are always followed by limi 2, limi 0 now.

This is after making those changes that didn't include limi 0 on a couple of kscans, but not anymore.

But even with making sure limi 2 limi 0 throughout the program after each kscan, the normal blanker still didn't work for me.

So, I just used the code that I had.

I've had to tell a few routines to clear my counter on any key press. And that's a simple thing.

 

9:07 again, on my 5th independent test.

 

 

 

Edited by GDMike
Link to comment
Share on other sites

"My screen saver routine now works again..." vs. "...stopping my actual screen blanker."(My vs. actual) ...Are these not actually one-and-the-same?

 

2 hours ago, GDMike said:

I can't find the limi 2 anywhere that maybe stopping my actual screen blanker.

 

LIMI 2, allows interrupts to occur.
LIMI 0, prohibits interrupts.

 

Thus, it is actually a LIMI 0, that would prevent said counter from running freely.:ponder:

Edited by HOME AUTOMATION
  • Like 1
  • Haha 1
Link to comment
Share on other sites

No! That would leave interrupts on, which is not what you want. It can lead to unpredictable results/effects that are very hard to track down.

 

Recall that (for example) reading from VDP requires two distinct operations:

 

* Set the VDP read address

* Read from the VDP read register

 

Now, imagine VDP interrupts are enabled. Your code loads the VDP read register, and then, just before you perform a read from the VDP read register, an interrupt occurs. Some code in the console interrupt service routine decides to read something from VDP. It loads the VDP read register and performs it's read. Then returns to your code. You now perform your VDP read, but the VDP read address was changed by the console ISR and you get garbage back! 

 

These subtle bugs are a nightmare to find, so we avoid them by closely controlling when interrupts can happen. 

  • Like 3
Link to comment
Share on other sites

1 hour ago, Willsy said:

No! That would leave interrupts on, which is not what you want. It can lead to unpredictable results/effects that are very hard to track down.

 

Recall that (for example) reading from VDP requires two distinct operations:

 

* Set the VDP read address

* Read from the VDP read register

 

Now, imagine VDP interrupts are enabled. Your code loads the VDP read register, and then, just before you perform a read from the VDP read register, an interrupt occurs. Some code in the console interrupt service routine decides to read something from VDP. It loads the VDP read register and performs it's read. Then returns to your code. You now perform your VDP read, but the VDP read address was changed by the console ISR and you get garbage back! 

 

These subtle bugs are a nightmare to find, so we avoid them by closely controlling when interrupts can happen. 

I will never stop being amazed at the concept of "polled" interrupts.  :)   What a weird machine we have.

When you think about the different interrupt levels that the hardware provides it's a bit sad. 

 

My solution to the VDP & interrupts was to use a common sub-routine for setting the VDP address that always masks interrupts and all the VDP routines enable interrupts when they exit.

It was a sh*t show until I learned about this. :) 

  • Like 2
Link to comment
Share on other sites

4 hours ago, GDMike said:

My screen saver routine now works again. Kicking in at 9:07 on my last few tests, but I'll test on real HW this next week.

I'm using my cursor counter routine since I can't find the limi 2 anywhere that maybe stopping my actual screen blanker. I've looked Everywhere , all my kscans are always followed by limi 2, limi 0 now.

This is after making those changes that didn't include limi 0 on a couple of kscans, but not anymore.

But even with making sure limi 2 limi 0 throughout the program after each kscan, the normal blanker still didn't work for me.

So, I just used the code that I had.

I've had to tell a few routines to clear my counter on any key press. And that's a simple thing.

 

9:07 again, on my 5th independent test.

 

The screen timeout timer reset has little to do with interrupts. I say, “little”, because it is the console ISR that increments the timer, which is effectively reset when it rolls over to 0. It does not ever, however, explicitly reset the timer.

 

In non-Basic environments, the screen timeout timer is explicitly reset only by KSCAN. Every call to KSCAN that detects a key-press resets the timer. The only key-press that does not require KSCAN is <quit>, which is the only key checked for by the console ISR. This is done without explicitly resetting the timer. It does, of course, execute a console reset.

 

...lee

 

 

  • Thanks 1
Link to comment
Share on other sites

In earlier times I wondered how this LIMI 2; LIMI 0 was supposed to work at all, because the window of enabled interrupts seems too small - only a few microseconds.

 

Later I learned that in our machine, we have level-triggered interrupts; that is, not the edge but the (persisting) level is relevant for the interrupt. Second, the video processor has an outgoing INT line which stays active until you read its VDP status register.

 

Thus, the theory behind this is: The VDP raises the interrupt line, and keeps it active; the LIMI 0 masks away this event until there is a LIMI 2, in which case the still active INT line finally gets through. The interrupt handler in the console then masks the interrupts again and (important!) reads the VDP status register, so releasing the interrupt.

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