Jump to content
Sign in to follow this  
TGB1718

Strange Timer2 issue

Recommended Posts

I've been having problems getting Timer 2 working even though I've used it many times in the past, essentially

it crashes the machine soon after it's initialized.

 

I did some testing and in spite of the frustration trying to figure out what's wrong (I thought it was a bug in Altirra), but

did a similar thing on a stock 800XL with SIDE3, but only at $A000.

 

Remaining testing done in Altirra:-

I noticed if a test routine was assembled in Page 6 it worked fine ???

I change the address to $4000 and still it was crashing, my original routine sat between $A000 and $AD00

 

My system for testing is a 130XE with U1M and SIDE3.

 

I compiled a test routine to run at all $2000,$3000 etc up to $B000

All tests worked except the ones at $4000,$5000,$6000,$7000 and $A000

 

I set the system to Stock 800XL with SIDE3 and the only failure was at $A000 ?

 

So it looks like Timer2 is being affected by probably 2 things.

As $A000 is affected I think SDX is doing something (I had to use the 'X' command to run the code although $B000 was ok)

and/or the 16K memory window for the switched RAM blocks is having some effect, I thought it may be U1M

but again SDX uses RAM through this window, so probably it's SDX again.

 

Anyone seen anything like this before.

 This is the simple test program in MAC/65

 

10       .INCLUDE #D:HEADER.M65
20       *=  $3000
30       LDA # <VBR
40       STA CDTMA2
50       LDA # >VBR
60       STA CDTMA2+1
70 RESET LDA #0
80       STA CDTMV2+1
90       LDA #30
0100     STA CDTMV2
0110     RTS 
0120 VBR INC NUM
0130     CLV 
0140     BVC RESET
0150 NUM .BYTE 0
0160     .OPT NO LIST

 

Share this post


Link to post
Share on other sites
16 minutes ago, TGB1718 said:

As $A000 is affected I think SDX is doing something

$A000-$BFFF is normally occupied by the SDX cartridge. If you want RAM there, use X command (as you did).

 

17 minutes ago, TGB1718 said:

the 16K memory window for the switched RAM blocks is having some effect, I thought it may be U1M

but again SDX uses RAM through this window

Yes, "USE BANKED" configuration, as you said, uses the Ext RAM, doing the memory banking at $4000-$7FFF. Any I/O call will result in the memory being banked, so if you put your interrupt routine there, expect a crash.

Share this post


Link to post
Share on other sites
8 minutes ago, drac030 said:

$A000-$BFFF is normally occupied by the SDX cartridge. If you want RAM there, use X command (as you did).

 

What was confusing me is calling @$A000 crashes, but $B000 doesn't and obviously I have to use the 'X' command

or it won't run anyway.

 

Thanks also for your explanation about the banked memory, I guessed as much, just annoyed at myself for not

spotting the issue was the banked ram are earlier.

Share this post


Link to post
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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...