Jump to content
IGNORED

Cartride Port CLK lines and Maria..


andym00

Recommended Posts

Silly question which I've never thought about before (welll a little bit, but not in this context), but when Maria is reading from anything outside of the internal 4K RAM, does it slow to the CPU clock 1.79Mhz clock for external memory accesses, or does it carry running on at 7.16Mhz ?

Just wondering about a little project, and am curious if I can feed Maria directly across the cartridge port from some logic running in a cart, but at full Maria speeds..

 

Are the CLK (and possibly R/W even though not needed) lines coming out on the cartridge port swapped between the CPU and Maria depending upon who's is currently active ?

 

I always wondered if ROM accesses by Maria were at fullspeed when I was dibbling around with 7800 things before..

I'd try it right now, but I don't have my CC2 with me here to test with..

 

Hmm, okay reading a bit more, seems I should use the HALT line to distinguish between CPU and Maria Reads ? Okay :)

Edited by andym00
Link to comment
Share on other sites

I am 99% certain that non-RAM (outside $1800-$27FF) Maria reads occur at 1.79MHz. There could be some low memory address ranges which are fullspeed, but you'd have to test it out.

 

Thinking of a 7800 DPC? Even if you could find a address range I'm not sure how much value there would be because I don't think MARIA would run at full speed for the graphics data even if it was in RAM.

Link to comment
Share on other sites

I am 99% certain that non-RAM (outside $1800-$27FF) Maria reads occur at 1.79MHz. There could be some low memory address ranges which are fullspeed, but you'd have to test it out.

 

My flash cartridge has an issue with graphics corruption. It seems there's a problem with Maria reads from the cartridge, but the 6502 works fine. I always assumed the clock speed was the difference. If they read the cart at the same speed then I'm confused. :|

Link to comment
Share on other sites

I am 99% certain that non-RAM (outside $1800-$27FF) Maria reads occur at 1.79MHz. There could be some low memory address ranges which are fullspeed, but you'd have to test it out.

 

Thinking of a 7800 DPC? Even if you could find a address range I'm not sure how much value there would be because I don't think MARIA would run at full speed for the graphics data even if it was in RAM.

 

From my experiments on a CC2, I believe all Maria reads occur at 2.39Mhz or 3.58Mhz. I have not looked at the clock signals to see what's going on, but I would guess that on the 2.39MHz reads the phi2 output works about as expected (but faster); on the 3.58MHz reads (which always occur in pairs) I would guess that phi2 is asserted for one read and not the other. The internal RAM is wired so that it does not need phi2 for read access, so it won't mind if the phi2 timing is goofy on the 3.58MHz reads. Rather bizarre design in quite a lot of ways.

Link to comment
Share on other sites

  • 2 months later...
on the 3.58MHz reads (which always occur in pairs) I would guess that phi2 is asserted for one read and not the other.

 

Damn - I just noticed the significance of this statement! It's been a long time, but I think I tied phi2 into an AND gate which controls the Flash ROM's CE pin. This might be why when I tried to use character mode graphics I ended up with every other character showing up as a blank. For example if I try to display the text string

 

JALAPENO

 

I end up seeing

 

J L P N

 

The characters are drawn fine, but half of them just don't show up. It works fine in an emulator.

I should try moving the character map into console RAM sometime and see if that affects it any.

Link to comment
Share on other sites

on the 3.58MHz reads (which always occur in pairs) I would guess that phi2 is asserted for one read and not the other.

 

Damn - I just noticed the significance of this statement! It's been a long time, but I think I tied phi2 into an AND gate which controls the Flash ROM's CE pin. This might be why when I tried to use character mode graphics I ended up with every other character showing up as a blank. For example if I try to display the text string

 

JALAPENO

 

I end up seeing

 

J L P N

 

The characters are drawn fine, but half of them just don't show up. It works fine in an emulator.

I should try moving the character map into console RAM sometime and see if that affects it any.

I believe somewhere in the documentation is says that character maps have to be in RAM. Not sure if that means RAM on a cartridge cannot be used for things that have to be in RAM?

Edited by kenfused
Link to comment
Share on other sites

I believe somewhere in the documentation is says that character maps have to be in RAM. Not sure if that means RAM on a cartridge cannot be used for things that have to be in RAM?

 

You're right. I couldn't find any mention of this in the 7800 Software Guide, but finally found this in the Maria acceptance specs:

 

Display lists and lists lists must be in fast (RAM) memory.

Character maps must be in fast memory.

Graphics may be in slow (ROM) memory.

 

The clock timings chart in both the acceptance specs and the software guide show that the DLL is read at 2 cycles/byte, so it makes sense that it needs to be in fast RAM. But the character maps are shown to read at 3 cycles/byte, which misled me to think they can be in ROM. Why can't they? Makes me wonder if the timing charts are wrong.

 

 

Regarding cartridge RAM, it seems to me it should work as long as it's fast enough. But I was using something like a 70ns Flash chip, so that should have worked too as far as I can tell. Maybe it also relates to the phi2 thing supercat mentioned. But if that's the issue, I can't understand why they wouldn't go ahead and read the charmaps at 2 cycles.

Edited by gdement
Link to comment
Share on other sites

Regarding cartridge RAM, it seems to me it should work as long as it's fast enough. But I was using something like a 70ns Flash chip, so that should have worked too as far as I can tell. Maybe it also relates to the phi2 thing supercat mentioned. But if that's the issue, I can't understand why they wouldn't go ahead and read the charmaps at 2 cycles.

 

In most cases, the MARIA can begin a memory cycle before it has to actually do anything with the results of the previous one. When doing a character-mode display, however, it can't fetch the shape data until after the character data is fetched. I would expect that the chip probably samples the character data after two clocks, then uses the third clock to move it to the address latch.

Link to comment
Share on other sites

Regarding cartridge RAM, it seems to me it should work as long as it's fast enough. But I was using something like a 70ns Flash chip, so that should have worked too as far as I can tell. Maybe it also relates to the phi2 thing supercat mentioned. But if that's the issue, I can't understand why they wouldn't go ahead and read the charmaps at 2 cycles.

 

In most cases, the MARIA can begin a memory cycle before it has to actually do anything with the results of the previous one. When doing a character-mode display, however, it can't fetch the shape data until after the character data is fetched. I would expect that the chip probably samples the character data after two clocks, then uses the third clock to move it to the address latch.

That makes sense. Thanks supercat and kenfused.

Edited by gdement
Link to comment
Share on other sites

  • 1 month later...
Damn - I just noticed the significance of this statement! It's been a long time, but I think I tied phi2 into an AND gate which controls the Flash ROM's CE pin. This might be why when I tried to use character mode graphics I ended up with every other character showing up as a blank. For example if I try to display the text string

When I was trying to get my board working with flash chips rather than EPROM chips, many of them had problems with graphics. I think one problem was that some flash chips need the CE de-asserted between accesses. It doesn't make much sense to me, but that did help a bit. I think many flash chips didn't work at all before I made that change.

Link to comment
Share on other sites

Damn - I just noticed the significance of this statement! It's been a long time, but I think I tied phi2 into an AND gate which controls the Flash ROM's CE pin. This might be why when I tried to use character mode graphics I ended up with every other character showing up as a blank. For example if I try to display the text string

When I was trying to get my board working with flash chips rather than EPROM chips, many of them had problems with graphics. I think one problem was that some flash chips need the CE de-asserted between accesses. It doesn't make much sense to me, but that did help a bit. I think many flash chips didn't work at all before I made that change.

 

 

Yeah, I remember reading your post about that, which is why I hooked it up that way. I tested it using some Atari ROMs, and noticed some glitchiness in Food Fight and Dark Chambers. Food Fight actually seemed to start out okay and get worse after it warmed up. There's likely something wrong with the way I put the cart together, but I think the text problem was probably a programming error on my part.

 

As far as the cart goes, I really should just start over with another pcb. My soldering wasn't that great, and I already had to repair a broken trace once. I'm also curious if resistance through my stacked sockets could be an issue, and I should have used a machine-pin socket at the base anyway.

But if phi2 isn't working on every read cycle, then I don't know how to cycle the CE.

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