Videopac / Odyssey2 forum
November 20, 2019, 04:43:01 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Al lot of attachments from Nov 2011 till april 2012 are damaged. Please ask the original poster to re-upload if you need them.
 
   Home   arcade Help Login Register links videopac.nl  
Pages: [1]   Go Down
  Print  
Author Topic: Using the so called "External" RAM?  (Read 698 times)
Sdw
Trying to get the cartridge in...
*
Posts: 30


« on: November 13, 2018, 01:36:19 PM »

So, a really stupid question:
I've run out of regular memory, (0x20-0x3f). I've read in some of the documentation that there is something called "External RAM", that can be accessed by somehow switching so that the MOVX command works on that instead of on the VDC.
* Is these 128 bytes of "external" RAM present in all consoles (so the "external" only means external to the CPU) or is it something that is on some carts only (external as "on the cartridge")?
* To access this memory, do you simply need to "orl P1,#008h", then use movx on addresses between 00-7f and then you do a "anl P1,#0f7h" to switch back to VDC-access?
Logged
Chris!
Give this man a Jopac!
******
Posts: 1145



WWW
« Reply #1 on: November 13, 2018, 08:39:51 PM »

If you're not using the quads' (0x40-0x7f), you can use those as well.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
TedFoolery
Played Munchkin once...
**
Posts: 75


« Reply #2 on: November 13, 2018, 09:08:31 PM »

Yes, the external RAM is present on all consoles. You certainly can use it to store any data you like, but in the original carts it's primarily used for updating the screen during vblank in a table-driven method. This prevents flicker, especially if you have a lot of things moving around and graphics to update.
Logged
LD
Pedit5
Attacked the Timelord
*
Posts: 136



« Reply #3 on: November 14, 2018, 02:03:26 AM »

Don't use bytes $3D, $3C and $3F from internal RAM as BIOS uses them to store timing, collision and video status.
You can set the extra ram and vdc using BIOS calls, if your code is in the first 1k:

vdcenable   equ   00E7h
extramenable   equ   00ECh

You can check these codes (assuming you have BIOS disassembly) to know exactly how to set the pins.
Logged
Sdw
Trying to get the cartridge in...
*
Posts: 30


« Reply #4 on: November 15, 2018, 04:48:40 PM »

If you're not using the quads' (0x40-0x7f), you can use those as well.

I am using the quads, but I got this other idea! What about the X/Y coordinates for quad characters? If I read the communication correctly, only the last of the four X/Y values are used, meaning there would be 2*3 = 6 bytes per quads, and four quads so 24 bytes of memory free for usage, and more accessible since I wouldn't need to switch between VDC/extra RAM access all the time!
Have anyone tried this? Are these 24 bytes read/writeable without problems?
Logged
LD
Pedit5
Attacked the Timelord
*
Posts: 136



« Reply #5 on: November 18, 2018, 12:09:10 AM »

They're mirrored.
Changing one changes all of them.
Also, I'm afraid you can't read back (write only).
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!