Jump to content
IGNORED

Can't find something


marc.hull

Recommended Posts

Awhile back (early July) there was some discussion about checking the VDP interrupt through the 9901. Tim posted an example and I simply cannot find it (albeit my search skills suck.) Anyone know what I am talking about and mind pointing it out please ? Marc

 

It was late in this thread: http://atariage.com/forums/topic/210888-smooth-scrolling/

 

...lee

Link to comment
Share on other sites

Ok, thanks....

 

I found the code Tim posted and it follows (Might get mangled).....

 

wait1 clr r12

wait2 tb 2 *VDP interrupt (poll 9901)

jeq wait2 *no, keep waiting

sbo 2 *yes, clear 9901 bit/VDP interrupt

movb @8802,r0 *read status from VPD

rt

 

I have duplicated it on a console and I cannot get it to behave correctly. It acts like the interrupt is constantly being presented but I don't know if the code is not quite correct or if my implementation is causing a problem.

 

While it is executing the interrupts have been turned off using LIMI 0 but my understanding is that this only prevents the 9900 from seeing them. Surely this instruction does not interfere with the VDP to 9901 line perhaps ?

 

At any rate, If someone has included this code successfully would you please report that.

 

Thanks

 

 

 

 

<EDIT>

 

Just occurred to me that between the last time I tried to get it to work and now I had to change the 9901 in the console because it stopped picking up some keys. Maybe the cause cause I can't why the code would not work. I'll try again this evening..

 

<UNEDIT>

Edited by marc.hull
Link to comment
Share on other sites

Doesn't it need to be >8802 (with a ">") in the second to last line?

 

I don't think you need the SBO 2 as you're only reading the state of the input bit, not using it to generate an interrupt.

 

If you're interested, I've put a 'tutorial' on using VDP interrupts on my TM990 system at <www.avjd51.dsl.pipex.com/tm990/tm990.htm#using_vdp_interrupts>. I've got the VDP interrupt connected to a TMS9901 in the same way as the 4A, but you can't use this technique directly on a 4A because you can't (easily) change the interrupt vectors at the bottom of memory.

Edited by Stuart
Link to comment
Share on other sites

Thanks Stuart. Of course it should be in hex notation, you are correct. I am not getting that far though. It gets caught in an endless loop waiting for CRU bit 2 to be low.

 

Tim's bit 2 has been verified by both the Explorer manual and Thierry's site.

 

Code looks good so I'm befuddled.

Link to comment
Share on other sites

I'm not there to look right now but I doubt it as I can still get the interrupt through the >8802 memory location with......

 

test movb @>8802,r1

andi r1,>8000

jeq out

*** delay to reduce race (>02ff count down loop) ***

jmp test

out rt

 

9900 interrupts are turned off in the code with LIMI 0. I'm not actually looking to use the interrupts but rather trying to detect them when they occur without the delay nor possibility of the read/write clash.

Link to comment
Share on other sites

Ah, but that's reading the interrupt flag in the VDP status register. Whether that signal leaves the VDP chip and goes down the bit of wire to the 9901 is controlled by the IE bit in register 1. In other words, the fact that you can read the interrupts from the status register does not necessarily mean that those interrupts are getting to the 9901. Try loading the value >E0 into register 1 just before your bit of code, and see if it still loops forever.

Link to comment
Share on other sites

 

Ah, but that's reading the interrupt flag in the VDP status register. Whether that signal leaves the VDP chip and goes down the bit of wire to the 9901 is controlled by the IE bit in register 1. In other words, the fact that you can read the interrupts from the status register does not necessarily mean that those interrupts are getting to the 9901. Try loading the value >E0 into register 1 just before your bit of code, and see if it still loops forever.

 

 

My reg 1 set up is >E2 so that bit is covered. Any ideas ?

Link to comment
Share on other sites

Hmmmm ... not sure.

 

Try inserting after your CLR R12 this little bit of code from Thierry's site which checks the <Enter> key, to confirm that at that point in your code you're able to read the INT bits on the 9901 ...

 

CLR R1 Test column 0

LI R12,>0024 Address for column selection

LDCR R1,3 Select column

TB -13 Test R12-address >000A, i.e <enter>

(then depending on how the bit is set, use VSBW to write either one character or another to the top left of the screen, then loop round again)

 

So with that loop running, do you get a different character displayed when you press/release the <enter> key?

Edited by Stuart
Link to comment
Share on other sites

 

Hmmmm ... not sure.

 

Try inserting after your CLR R12 this little bit of code from Thierry's site which checks the <Enter> key, to confirm that at that point in your code you're able to read the INT bits on the 9901 ...

 

CLR R1 Test column 0

LI R12,>0024 Address for column selection

LDCR R1,3 Select column

TB -13 Test R12-address >000A, i.e <enter>

(then depending on how the bit is set, use VSBW to write either one character or another to the top left of the screen, then loop round again)

 

So with that loop running, do you get a different character displayed when you press/release the <enter> key?

 

 

I am swapping this routine in to a working bit of code so if you are looking for a hangup somewhere else then I'm afraid that's not the case. There is a definite disconnect between the VDP and the 9901.

 

If your wondering if perhaps the 9901 is not set to accept interrupts then I have wondered the same. I am using thierry's code to detect the joysticks. I am beginning to wonder if I am missing something with resetting up the 9901 when exiting the joy stick sub ??? I have blatantly lifted his code so it is available on his site.

Link to comment
Share on other sites

I tried the code and discovered in a stand-alone situation it got stuck in an endless loop. The 9901 interrupt line was not receiving the signal.

 

To fix, I needed to set VDP register 1's IE bit as Stuart recommended earlier.

 

You will also need to read the VDP status byte to properly clear the 9918 interrupt. SBO 2 (9901) is there to enable the 9901 output, which allows you to detect the interrupt via the TB 2 instruction.

 

Seems the 9918 interrupt is not being presented via the 9901 for some reason. If the 9901 were bad the OS interrupt routine would fail along with automotion and other ROM-specific code. Sounds like you may be mucking up VDP Reg 1. That's my current theory :)

Link to comment
Share on other sites

Here is the test code. It spins for 5 seconds then returns.

       LIMI 0
       LI  R1,>0170    VDP Reg 1, Enable IE bit.(mode bits may vary)
       BLWP @VWTR
       CLR  R12        9901 base cru
       SBO  2          vdp int via 9901, enable
       LI   R1,60*5    duration in 60th of a second slice
 
WAIT1 CLR R12
WAIT2 TB   2           vdp interrupt? (via 9901)
      JEQ  WAIT2       no, spin and wait
      SBO  2           enable 9901 int (tests show this may not be needed)
      MOVB @VDPST,R2   read status to clear 9918 VDP Interrupt
      DEC R1           counter expired?
      JNE   WAIT1      no, tick off another 60th of a second
      BLWP @0



 

 

 

  • Like 1
Link to comment
Share on other sites

 

Here is the test code. It spins for 5 seconds then returns.

LIMI 0       LI  R1,>0170    VDP Reg 1, Enable IE bit.(mode bits may vary)       BLWP @VWTR       CLR  R12        9901 base cru       SBO  2          vdp int via 9901, enable       LI   R1,60*5    duration in 60th of a second slice WAIT1 CLR R12WAIT2 TB   2           vdp interrupt? (via 9901)      JEQ  WAIT2       no, spin and wait      SBO  2           enable 9901 int (tests show this may not be needed)      MOVB @VDPST,R2   read status to clear 9918 VDP Interrupt      DEC R1           counter expired?      JNE   WAIT1      no, tick off another 60th of a second      BLWP @0


 

 

 

 

I think may shit the bed on my reports. Before I come off the top rope at you gents I'd like to check my facts. time out ????

 

 
Link to comment
Share on other sites

   

 

Nope......

 

This seems a dead end.......

 

Doesn't work on the gear....

 

Post some code? What I posted above does work on real gear here.

 

Edit: I should clarify this works on my Geneve both in Geneve mode and in TI mode. The 9901 and VDPINT lines are set up in the same fashion between the 4A and Geneve, for compatibility with joysticks, VDP, etc. I could not test (yet) on my TI.

Edited by InsaneMultitasker
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...