Jump to content
IGNORED

130XE extended RAM separate CPU/Antic access check


sanny

Recommended Posts

Simply ask the user :D

 

Maybe it can be much easier but I would prepare some simple display list in extended RAM with DLI (in which set some flag that the DLI was run) and the same WITHOUT DLI in standard RAM at the same memory location. Set separate access for ANTIC to the extended RAM, enable DLI, wait one frame and check for the flag...

Edited by MaPa
Link to comment
Share on other sites

Simply ask the user :D

 

That's not really "programmatically", is it? :twisted:

 

Maybe it can be much easier but I would prepare some simple display list in extended RAM with DLI (in which set some flag that the DLI was run) and the same WITHOUT DLI in standard RAM at the same memory location. Then enable DLI, wait one frame and check for the flag...

 

Yeah, that's a good idea.

Link to comment
Share on other sites

Peter Dell's explanation of the method:

 

 


You can using the PM collision registers to do that. Put zeros in the normal bank and $FF on the XRAM bank, then set PMBASE to $40 and HPOS to $80 or so.
Put some graphics there, too then check if GTIA detects a collision between PM and playfield.

Only takes one frame and you can just set all colors to black, so nobody will notice.

But he adds:


While this is possible, you should consider coding in a way that does not rely on separate CPU/ANTIC access. Everything else will limit your customer base.

http://atariage.com/forums/topic/251634-130xe-and-antic-cycle-stealing/?do=findComment&comment=3493748

  • Like 1
Link to comment
Share on other sites

You need to setup two display lists (standard and extended RAM), one with no playfield data (empty dlist) and another with some playfield data, enable PMG, set GRAFx to fill PMG stripe on screen, set it's position that it will collide with the possible playfield data and then check collision register.

  • Like 1
Link to comment
Share on other sites

Peter Dell's explanation of the method:

 

 

But he adds:

While this is possible, you should consider coding in a way that does not rely on separate CPU/ANTIC access. Everything else will limit your customer base.

http://atariage.com/forums/topic/251634-130xe-and-antic-cycle-stealing/?do=findComment&comment=3493748

 

That's funny because using extended RAM limits your customer base, as well as requiring 64k, 48k, 32k and 16k, Not to forget the most limiting factor: PAL ONLY.

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

Ok.

 

I think I understood.

 

For a simple test program which outputs "supported yes/no", started from DOS, I think MaPa's idea is better. The other method will change/flicker the screen, IIUC. MaPa's method could be made to be "flickerless".

 

So, another question: For extensions with much memory (many banks), is this check needed for every bank, or can one say if one bank works, any bank works (don't know offhand if such a > 128KB configuration could be possible with the 8 bits of PORTB without disturbing the CPU/Antic bits)?

Link to comment
Share on other sites

with one DLIST this is also possible:

 

lda #4
jsr $ef9c ; gr.4
ldy #4
lda $230
sta $80
lda $231
sta $81
lda #$00
@ sta ($80),y
iny
eor #$40
bne @- ; LMS $4000
lda #%11001111
sta $d301
sta $4000 ; ext ram
lda #%11011111
sta $d301
lda #$00
sta $4000 ; base ram
@ lda $d40b
bne @-
sta $d40a
sta $d40a ; wait
sta $d01e ; hitctr
lda #$ff
sta $d00d ;graf
lda #$31
sta $d000 ;pos
@ lda $d40b ; wait
bne @-
lda $d004 ; p0pf
A=1 - means 100% compatible
  • Like 2
Link to comment
Share on other sites

Hello sanny

 

You only have to test one bank of the extended memory. The banks either all have separate ANTIC and CPU access or none of them have it.

 

I once developed a 1MB upgrade for the XEGS. My XEGS has 1MB extended memory, 64 kB of main RAM, separate access of ANTIC and CPU plus full software control of BASIC, OS ROM/RAM, Selftest and Missile Command. And no flickering. I'm only using $D301.

 

Unfortunately, I don't have the knowledge to turn it into a marketable product that will work on all XLs and XEs.

 

Sincerely

 

Mathy

  • Like 2
Link to comment
Share on other sites

  • 4 years later...

A program to test the presence of extended memory (130XE):

 

  org $600							  ; Address of this segment

; Init
  lda #$00                ; Disable the display
  sta DMACTL
  sta SDMCTL
  lda PORTB               ; Disable BASIC on XL/XE
  ora #$02
  sta PORTB
  lda #$01
  sta $0244               ; Coldstart
; Init end

;Base 64kb RAM:
  lda #%11111111          ;Set Base 64kb RAM ($FF)
  sta $d301
  lda #$10                ;It should be stored to Base 64kb RAM
  sta $4000

;Bank 1:
  lda #%11000011          ;Set Extended 64kb RAM: 16kb bank 1 ($C3) to $4000-$7999
  sta $d301
  lda #$01                ;It should be stored to bank 1
  sta $4000
  ldy $4000
  ;Back to main RAM:
  lda #%11111111          ;Set Base 64kb RAM ($FF)
  sta $d301
  sty $4001               ;It should be stored to Base 64kb RAM

;Bank 2:
  lda #%11000111          ;Set Extended 64kb RAM: 16kb bank 2 ($C7) to $4000-$7999
  sta $d301
  lda #$02                ;It should be stored to bank 2
  sta $4000
  ldy $4000
  ;Back to main RAM:
  lda #%11111111          ;Set Base 64kb RAM ($FF)
  sta $d301
  sty $4002               ;It should be stored to Base 64kb RAM

;Bank 3:
  lda #%11001011          ;Set Extended 64kb RAM: 16kb bank 3 ($CB) to $4000-$7999
  sta $d301
  lda #$03                ;It should be stored to bank 3
  sta $4000
  ldy $4000
  ;Back to main RAM:
  lda #%11111111          ;Set Base 64kb RAM ($FF)
  sta $d301
  sty $4003               ;It should be stored to Base 64kb RAM

;Bank 4:
  lda #%11001111          ;Set Extended 64kb RAM: 16kb bank 4 ($CF) to $4000-$7999
  sta $d301
  lda #$04                ;It should be stored to bank 4
  sta $4000
  ldy $4000
  ;Back to main RAM:
  lda #%11111111          ;Set Base 64kb RAM ($FF)
  sta $d301
  sty $4004               ;It should be stored to Base 64kb RAM


loop
  jmp loop
  run $600							  ;Start this program

 

130XE:

2006964347_Memory130XE.png.754c446e6d556da0003374bc927f7c01.png

 

65XE:

1967552476_Memorywith65XE.png.79e11bed7f7f6dbfb982826d62ecc64d.png

 

 

extendedmemory1.jpg.3d679ea462750e3467b764bedb26b0ed.jpg        extendedmemory3.jpg.94dad61126e5bb2167153ee0b81e2f1c.jpg

 

 

 

130XE Memory Management.pdf

Edited by tane
Link to comment
Share on other sites

  • 2 weeks later...

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