Ultimax mode VIC II access to external RAM?

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Ultimax mode VIC II access to external RAM?

Jim Brain

Ultimax mode is clearly one of the most confusing (and thus interesting) modes on the C64. 

I see that one can populate external RAM on the cart bus, and access it in Ultimax mode.  But, the documents don't seem to indicate if the VIC-II an "see" that RAM in the mode. 

http://codebase64.org/doku.php?id=base:memmanage

However, this is not true for the Ultimax video game
configuration. In that mode, the internal RAM ignores all
memory accesses outside the area $0000-$0FFF, unless they
are performed by the VIC, and you can write to external
memory at $1000-$CFFF and $E000-$FFFF, if any, without
changing the contents of the internal RAM.

Marko noted long ago that he was aware of a page the VIC could read from, and there is this note on the list archives from 1999:

http://cbm-hackers.2304266.n4.nabble.com/lt-Q-gt-C64-ULTIMAX-mode-td4059331.html

Does anyone have more information?

Also, on this portion of the archive:

http://cbm-hackers.2304266.n4.nabble.com/Ultimax-questions-td4615195.html

skoe notes that he was leery of just decoding the address lines because of the state of $01.  How would the state of $01 be of interest or concern in Ultimax mode?

Jim

--
Jim Brain
[hidden email] 
www.jbrain.com
Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

Marko Mäkelä
Hi Jim,

On Mon, Apr 30, 2018 at 12:15:13AM -0500, Jim Brain wrote:

>However, this is not true for the Ultimax video game configuration. In
>that mode, the internal RAM ignores all memory accesses outside the
>area $0000-$0FFF, unless they are performed by the VIC, and you can
>write to external memory at $1000-$CFFF and $E000-$FFFF, if any,
>without changing the contents of the internal RAM.
>
>Marko noted long ago that he was aware of a page the VIC could read
>from, and there is this note on the list archives from 1999:
>
>http://cbm-hackers.2304266.n4.nabble.com/lt-Q-gt-C64-ULTIMAX-mode-td4059331.html

I have nothing to add to that. Or maybe only a little detail: On the
C128, you can write the EXROM and GAME lines on the MMU, and also switch
to C64 mode (including UltiMax mode). If you make the VIC-IIe display
the "external memory" (while nothing is connected to ROMH or ROML), then
it will display the data read or written by the 8502.

>Does anyone have more information?
>
>Also, on this portion of the archive:
>
>http://cbm-hackers.2304266.n4.nabble.com/Ultimax-questions-td4615195.html
>
>skoe notes that he was leery of just decoding the address lines because
>of the state of $01.  How would the state of $01 be of interest or
>concern in Ultimax mode?

In the PLA equations, both ROML and ROMH depend on HIRAM. ROML also
depends on LORAM. Both LORAM and HIRAM are connected to the 6510 on-chip
I/O port that is mapped to the data register at $01.

Did you see this document from 2012/2013?
http://www.zimmers.net/anonftp/pub/cbm/firmware/computers/c64/C64_PLA_Dissected.pdf

        Marko

Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

Michał Pleban
In reply to this post by Jim Brain
Hello!

Jim Brain wrote:

> Ultimax mode is clearly one of the most confusing (and thus interesting)
> modes on the C64.
> I see that one can populate external RAM on the cart bus, and access it
> in Ultimax mode.  But, the documents don't seem to indicate if the
> VIC-II an "see" that RAM in the mode.

I am not sure what kind of RAM you mean here.

Ultimax has 2 kB of RAM, and the cartridge port has a decode line for
additional 2 kB (in the C64 this line os repurposed for $DF00 I/O). I
have not personally tested whether VIC can access this additional RAM,
but I don't see any reason why it wouldn't (it could be easily tested
using the MAX Basic cartridge, which contains this extra RAM). The C64,
however, always provides 4 kB of RAM in Ultimax mode, so this extra RAM
on cartridge is never used even if it is attached.

Or do you perhaps mean attaching RAM in place of ROM chips? In that
case, VIC does not normally see these ROM chips so it will not see RAM
there as well (except, of course, the area hardwired to $3000).

Or do you mean attaching additional RAM in the unused address space, for
example $1000-$2FFF (for which you must do your own address decoding)?
Then I don't know exactly whot would happen, but my gut tells me that in
the real Ultimax VIC would see this RAM, but in the C64 it might or
might not (my bet is on "not").

Not very informative, but without building the actual hardware it's all
guesswork at this point.

Regards,
Michau.





>
> http://codebase64.org/doku.php?id=base:memmanage
>
> However, this is not true for the Ultimax video game
> configuration. In that mode, the internal RAM ignores all
> memory accesses outside the area $0000-$0FFF, unless they
> are performed by the VIC, and you can write to external
> memory at $1000-$CFFF and $E000-$FFFF, if any, without
> changing the contents of the internal RAM.
>
> Marko noted long ago that he was aware of a page the VIC could read
> from, and there is this note on the list archives from 1999:
>
> http://cbm-hackers.2304266.n4.nabble.com/lt-Q-gt-C64-ULTIMAX-mode-td4059331.html
>
> Does anyone have more information?
>
> Also, on this portion of the archive:
>
> http://cbm-hackers.2304266.n4.nabble.com/Ultimax-questions-td4615195.html
>
> skoe notes that he was leery of just decoding the address lines because
> of the state of $01.  How would the state of $01 be of interest or
> concern in Ultimax mode?
>
> Jim
>
> --
>
> Jim Brain
> [hidden email]
> www.jbrain.com
>


smf
Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

smf
In reply to this post by Jim Brain
I believe KCS Power cartridge uses ultimax mode to display sprites from rom.

On 30/04/2018 06:15, Jim Brain wrote:

> Ultimax mode is clearly one of the most confusing (and thus
> interesting) modes on the C64.
>
> I see that one can populate external RAM on the cart bus, and access
> it in Ultimax mode.  But, the documents don't seem to indicate if the
> VIC-II an "see" that RAM in the mode.
>

smf
Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

smf

On 30/04/2018 15:51, smf wrote:
> I believe KCS Power cartridge uses ultimax mode to display sprites
> from rom.
>
FWIW this functionality was recently fixed in the ultimate 64 kcs power
cartridge emulation. So it might be easy to track down how it works from
there.


Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

Groepaz
In reply to this post by smf
also the FC3 freezer iirc

Am Montag, 30. April 2018, 16:51:58 CEST schrieb smf:
> I believe KCS Power cartridge uses ultimax mode to display sprites from rom.
> On 30/04/2018 06:15, Jim Brain wrote:
> > Ultimax mode is clearly one of the most confusing (and thus
> > interesting) modes on the C64.
> >
> > I see that one can populate external RAM on the cart bus, and access
> > it in Ultimax mode.  But, the documents don't seem to indicate if the
> > VIC-II an "see" that RAM in the mode.


--

http://hitmen.eu                 http://ar.pokefinder.org
http://vice-emu.sourceforge.net  http://magicdisk.untergrund.net

Having a smoking section in a restaurant is like havin a peeing section in a
swimming pool.
<Edward Burr>





Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

Michał Pleban
In reply to this post by smf
Hello!

smf wrote:

> I believe KCS Power cartridge uses ultimax mode to display sprites from
> rom.

Ultimax mode has ROM mapped to $3000 for VIC, this was normally used by
Ultimax games for chargen location. So sprites can be displayed from
there too, or even bottom half of the hires screen if someone is so
masochistic.

Regards,
Michau.

Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

Groepaz
In reply to this post by smf
Am Montag, 30. April 2018, 16:54:27 CEST schrieb smf:
> On 30/04/2018 15:51, smf wrote:
> > I believe KCS Power cartridge uses ultimax mode to display sprites
> > from rom.
>
> FWIW this functionality was recently fixed in the ultimate 64 kcs power
> cartridge emulation. So it might be easy to track down how it works from
> there.

or even easier: check what it does in VICE :)

--

http://hitmen.eu                 http://ar.pokefinder.org
http://vice-emu.sourceforge.net  http://magicdisk.untergrund.net

Rock journalism is people who can't write, interviewing people who can't talk,
for the benefit of people who can't read.
<Frank Zappa>





smf
Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

smf
On 30/04/2018 16:02, [hidden email] wrote:

> or even easier: check what it does in VICE :)

I struggle to find anything in the vice source code, it doesn't work how
I would expect.

I'm more comfortable with the MAME source code, which still leaves a lot
to be desired but there is an effort to make it easier to translate
hardware to emulation and vice versa.

The ultimate 64 is designed to work with the actual cartridge, so there
is less room for cheating.


Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

Jim Brain
In reply to this post by Marko Mäkelä
On 4/30/2018 4:32 AM, Marko Mäkelä wrote:
>
> In the PLA equations, both ROML and ROMH depend on HIRAM. ROML also
> depends on LORAM. Both LORAM and HIRAM are connected to the 6510
> on-chip I/O port that is mapped to the data register at $01.
UNderstood.  I just thought it strange that he's be worried about it, as
I assume his hardware would only be on the bus if the code knew about
it, and so he would know the state.
>
> Did you see this document from 2012/2013?
> http://www.zimmers.net/anonftp/pub/cbm/firmware/computers/c64/C64_PLA_Dissected.pdf 
>
I had read it, but I reread it jsut to be up to speed.
>
>     Marko
>

--
Jim Brain
[hidden email]
www.jbrain.com


Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

Jim Brain
In reply to this post by Michał Pleban
On 4/30/2018 7:58 AM, Michał Pleban wrote:

> Hello!
>
> Jim Brain wrote:
>
>
> Or do you mean attaching additional RAM in the unused address space, for
> example $1000-$2FFF (for which you must do your own address decoding)?
> Then I don't know exactly whot would happen, but my gut tells me that in
> the real Ultimax VIC would see this RAM, but in the C64 it might or
> might not (my bet is on "not").
This is the case I am wondering about.

Jim

smf
Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

smf
In reply to this post by Michał Pleban
On 30/04/2018 13:58, Michał Pleban wrote:

> VIC does not normally see these ROM chips so it will not see RAM
> there as well (except, of course, the area hardwired to $3000).

VICII sees whatever is enabled when it tries to fetch, the PLA only
enables RAM or  CHARGEN in C64 mode.

In ultimax mode you can supply VICII with external data from ROM, RAM,
or even procedurally generated data for the unpopulated areas.

I don't believe you can externally override the low 2k in ultimax mode.
You probably need to do your own address decoding.


Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

Michał Pleban
In reply to this post by Jim Brain
Hello!

Jim Brain wrote:

>> Or do you mean attaching additional RAM in the unused address space, for
>> example $1000-$2FFF (for which you must do your own address decoding)?
>> Then I don't know exactly whot would happen, but my gut tells me that in
>> the real Ultimax VIC would see this RAM, but in the C64 it might or
>> might not (my bet is on "not").
> This is the case I am wondering about.

OK. I don't have a C64 laying around, but the easiest thing to do would
be to plug MAX BASIC Ultimax cartridge, program the VIC from the BASIC
to access this memory area, and use the logic analyzer to see what;'s on
the bus. In the real Ultimax I am 99% sure the VIC will see it, but on
the C64 it's not so certain.

Regards,
Michau.


Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

Groepaz
Am Donnerstag, 3. Mai 2018, 11:25:26 CEST schrieb Michał Pleban:

> Hello!
>
> Jim Brain wrote:
> >> Or do you mean attaching additional RAM in the unused address space, for
> >> example $1000-$2FFF (for which you must do your own address decoding)?
> >> Then I don't know exactly whot would happen, but my gut tells me that in
> >> the real Ultimax VIC would see this RAM, but in the C64 it might or
> >> might not (my bet is on "not").
> >
> > This is the case I am wondering about.
>
> OK. I don't have a C64 laying around, but the easiest thing to do would
> be to plug MAX BASIC Ultimax cartridge, program the VIC from the BASIC
> to access this memory area, and use the logic analyzer to see what;'s on
> the bus. In the real Ultimax I am 99% sure the VIC will see it, but on
> the C64 it's not so certain.

or just use this program: http://wiki.icomp.de/w/images/d/d7/Pla.zip

--

http://hitmen.eu                 http://ar.pokefinder.org
http://vice-emu.sourceforge.net  http://magicdisk.untergrund.net

Freedom of the press belongs to those who own one.
<A. J. Leibling>





Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

MiaM
In reply to this post by Michał Pleban
Den Thu, 03 May 2018 11:25:26 +0200 skrev Michał Pleban
<[hidden email]>:

> Hello!
>
> Jim Brain wrote:
>
> >> Or do you mean attaching additional RAM in the unused address
> >> space, for example $1000-$2FFF (for which you must do your own
> >> address decoding)? Then I don't know exactly whot would happen,
> >> but my gut tells me that in the real Ultimax VIC would see this
> >> RAM, but in the C64 it might or might not (my bet is on "not").
> > This is the case I am wondering about.
>
> OK. I don't have a C64 laying around, but the easiest thing to do
> would be to plug MAX BASIC Ultimax cartridge, program the VIC from
> the BASIC to access this memory area, and use the logic analyzer to
> see what;'s on the bus. In the real Ultimax I am 99% sure the VIC
> will see it, but on the C64 it's not so certain.

I've read somewhere that one of the decoded I/O select lines on a C64
were once the decode for more memory on a MAX/UltiMAX. Maybe that is
used instead of a real decoder in the MAX/UltiMAX basic cartridge?

--
(\_/) Copy the bunny to your mails to help
(O.o) him achieve world domination.
(> <) Come join the dark side.
/_|_\ We have cookies.

smf
Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

smf
On 04/05/2018 03:39, Mia Magnusson wrote:

> I've read somewhere that one of the decoded I/O select lines on a C64
> were once the decode for more memory on a MAX/UltiMAX. Maybe that is
> used instead of a real decoder in the MAX/UltiMAX basic cartridge?

IO2 doesn't exist at all on the Ultimax, IIRC it's used for a cia shift
register pin.

IO1 seems to be the same $DE00 select on the Ultimax and C64, you could
put RAM there but it's a bit out of the way.

I'd like to see a Max basic cartridge, but I'm guessing that it used
it's own decoding. It's super trivial to and/or a few lines together.


Reply | Threaded
Open this post in threaded view
|

Re: Ultimax mode VIC II access to external RAM?

Michał Pleban
Hello!

smf wrote:

> IO2 doesn't exist at all on the Ultimax, IIRC it's used for a cia shift
> register pin.

No, it is used as a CIA chip select signal. CIA CNT and LD pins are
where the /GAME and DOTCLK signals are on the C64.

> IO1 seems to be the same $DE00 select on the Ultimax and C64, you could
> put RAM there but it's a bit out of the way.

No, IO1 _is_ the external RAM select in the Ultimax.

> I'd like to see a Max basic cartridge, but I'm guessing that it used
> it's own decoding. It's super trivial to and/or a few lines together.

No, see above.

Regards,
Michau.