SUCCESS !!!
Hardware wise is really easy, just wire the PB6 line (pin 35) to the
high address line (A15) on the 64K EPROM.
The software end was a little trickier, the 6522 info I have and the actual
execution of the thing don't work quite the same ...
Basically, if you set the PB6 line to INPUT, it seems to automatically go
high. If you set it to OUTPUT, it goes low. You can send a high bit in the
output mode, but it will only pulse once, then reset to low. This could be
useful for larger carts, but I need the 2 banks to stay steady right now without
re-writing all 8 programs. I'm not sure if my manual is wrong or the Vec does
this, either way - it works. Now I just need to test it on some more machines
before I implement it into the final package.
Looks like emulator users will be getting Volume I and Volume II
seperate binaries.
JD
.
Anti SPAM In Use !
Remove the * from *pcj...@monmouth.com
to send E-Mail.
SWEEET DEAL!! Sounds like you've outdone yourself again John! Can't wait to
get my grubby little hands on it and play into the wee hours until the sun
comes up! ;)
Keep up the outstanding work!
Sincerely,
Brett Walach
Thank heavens for my trusty logic probe with a pulse detector !
>I've also noticed that, for some reason, PB6 is being initialised to be an
>input(!) by the EXEC ROM....this is inconsistent with everything I've read
>which suggests this line was intended to be used to switch between two 32K
>ROM banks. Seems more like it was actually intended to be used as some sort
>of input from the cartridge - possibly a "cartridge present" signal?
>
Yes, the bit is definitely set as an input right at the begining of the
initialization code.
Kind of makes you wonder what other possibilities are now open ...
JD
> Thanks to Peter Pachla's suggestion, I spent the last 2 nights working
>on the software selectable mini bankswitch cart....
Wow, fame at last. ;-)
>....and I'm pleased to announce:
>
> SUCCESS !!!
Great news.
> The software end was a little trickier, the 6522 info I have and the
>actual execution of the thing don't work quite the same ...
Uh, oh....
> Basically, if you set the PB6 line to INPUT, it seems to automatically
>go high....
That sounds about right.
When the pin is set to input mode it isn't driven by the bus drivers inside
the 6522, this being a TTL/MOS IC an undriven input will tend to float high.
> If you set it to OUTPUT, it goes low. You can send a high bit in the
>output mode, but it will only pulse once, then reset to low....
OK, you've probably spotted this yourself by now, but it appears to be the
fault of the Vectrex' EXEC ROM.
If you examine the "read buttons" and sound routines you'll see that
whenever they write to VIA port B they don't only change the bits they are
fiddling with at the time (by reading the current contents of port B and
ANDing/ORing as apt.) but just blast the entire register with whatever they
think should be in it.
The button and sound routines always write "0" to PB6. I haven't looked any
further through the code but I'd assume this is the case wherever the EXEC
ROM writes to VIA port B. :-(
I've also noticed that, for some reason, PB6 is being initialised to be an
input(!) by the EXEC ROM....this is inconsistent with everything I've read
which suggests this line was intended to be used to switch between two 32K
ROM banks. Seems more like it was actually intended to be used as some sort
of input from the cartridge - possibly a "cartridge present" signal?
Sorry to have lead you off on what seems to be a wild goose chase.
TTFN - Pete.
--
Spam deflector in effect, edit reply address - it's obvious!
**********
Join "vectrex_dev" today, the new mailing list for Vectrex developers.
Go to http://www.egroups.com/list/vectrex_dev/ to join.
**********
Hardware & Software Engineer. Sound Engineer.
Collector of Arcade Machines, Games Consoles & Obsolete Computers (esp DEC)
--
> > Basically, if you set the PB6 line to INPUT, it seems to automatically
> >go high....
>
> That sounds about right.
>
> When the pin is set to input mode it isn't driven by the bus drivers
inside
> the 6522, this being a TTL/MOS IC an undriven input will tend to float
high.
John D.,
Hmmm, If it's just floating HIGH when set to an input I would add a 10K ohm
pull-up resistor in the CART from PB6 to +5V. I looked at the schematic and
didn't see one inside the Vectrex. Never rely on a floating input to control
something such as this or it may come back to haunt you. The floating input
may not float so high on someone else's Vectrex causing it to hold your bank
switch in the CART low. Actually, the 64K EPROM in the CART may pull that
line low in some cases. The resistor won't hurt the line when it is changed
to an output and driven LOW either. Another possibility is turning on
internal pull-up resistors inside the 6522, if it has that option...I really
wouldn't know. But you still might run into problems with that if the
Vectrex EXEC ROM is resetting and setting various bits inside the 6522. The
pull-up is a safe bet.
BTW: Are you using Marks PCB's for your new game? Still going to use the
Intelli cases?
Sincerely,
Brett Walach
I've tried it on 3 Vectrexes so far and they all work the same way. The Exec
sets PB6 as an input as soon as it starts up. The PB6 line immediately goes
high at that point. Setting PB6 as an output sets it low, setting it again as
an input makes it go high.
A 6522 is not a TTL chip. This may explain the odd behaviour.
>....A simple loop with a standard WAITRCL will hold it low when set as
>an output. Setting it high will only last one cycle.
Annoyingly I cannot find my Rockwell data book at the moment, which contains
the 6522 programming details. However AFAIR this pin shouldn't be acting in
this manner, and I can't think of a mode in which it would work this way.
The pulse you're getting would be too short for an interrupt routine to be
resetting the bit "accidentally".
Do you have another Vec' you could test your code on, or another 6522 you
could pop in there to eliminate a hardware problem (assuming you logic board
is socketed)?
> Kind of makes you wonder what other possibilities are now open ...
Well....one possibility springs to mind, you could use a flip-flop triggered
by PB6 to switch banks.
If you used a 7474, you could use "Q" to provide the A15 signal to the EPROM.
"/Q" would be connected to the flip-flops "D" input causing the state of "Q"
to invert with each clock pulse (provided by connecting PB6 to the clock
input).
As long as you had the menu program in the same relative location in each
bank, and a byte in there somewhere to identify which bank is enabled, you
wouldn't need to worry about the initial state of the flip-flop when you power
up or reset the machine.
I haven't checked, but surely a flip flop is cheaper than a switch?
TTFN - Pete (listening to Orbital).
> Hmmm, If it's just floating HIGH when set to an input I would add a 10K
>ohm pull-up resistor in the CART from PB6 to +5V. I looked at the schematic
>and didn't see one inside the Vectrex. Never rely on a floating input to
>control something such as this or it may come back to haunt you.....
Absolutely, TTL inputs are not guaranteed to float either high or low. They
TEND to float high in most cases, but that one time that they don't will get
you sooner or later....
TTFN - Pete.
> A 6522 is not a TTL chip. This may explain the odd behaviour.
True, it's a MOS IC isn't it? If so it should act pretty much the same way as
a TTL IC AFAIR.
> I've tried it on 3 Vectrexes so far and they all work the same
>way....
Well, that blows that theory out of the water.... :-)
Since that's obviously the way all Vectrex' work I'd suggest giving that
flip-flop idea a whirl. I can think of other solutions, but they all involve a
lot more hardware (and I'm sure you've considered them already). :-(
How about a time delayed, open collector, one shot that holds the bank
switch LOW until the menu loads and takes over? Is this the problem
though... you get a pulse which starts to screw with the bank switching
before you want it to? I might even be able to get the same action out of an
8 pin DIP PIC Microchip with no external components.. just need an
appropriate time delay...? Or.. it could look for another pin to go HIGH/LOW
to change the bank switch input from LOW to TRI-STATE. Would cost 84 cents
each in quantities of 100.
I'm I on the right page here?
Sincerely,
Brett Walach
>How about a time delayed, open collector, one shot that holds the bank
>switch LOW until the menu loads and takes over? Is this the problem
>though... you get a pulse which starts to screw with the bank switching
>before you want it to?
No, the problem, as I understand it, is that John is extending an existing
design and cat'n use PB6 as an address input to the ROM (essentially switching
between two 32K banks) because when used as an output it won't stay high. You
*NEED* that line to be stable in both states, a pulse is no use....
That's why I suggested a flip-flop wired so that it's output toggles every
time it's clocked. It's not an ideal solution by any means, but is
quick/simple/cheap alternative to a switch.
The disadvantage is that you need the menu program to be present in the same
place in each of the two 32K banks since you don't know in what state the
flip-flop will power up in - though on reflection you'd have much the same
problem with the version with a switch.
>That's why I suggested a flip-flop wired so that it's output toggles every
>time it's clocked. It's not an ideal solution by any means, but is
>quick/simple/cheap alternative to a switch.
>
>The disadvantage is that you need the menu program to be present in the same
>place in each of the two 32K banks since you don't know in what state the
>flip-flop will power up in - though on reflection you'd have much the same
>problem with the version with a switch.
>
My menu actually starts at 30,000 - this is because I don't have the source
for Disc Duel and didn't feel like de-compiling/recompiling it.
Basically, each game runs it's on it's own until you tell it to
go back to Vecmania, at which time it warm resets at $F000.
Regardless what bank you're on, it's the same code and you don't
have to worry about switching the bank until you run the game.
> Beats me why it goes high when it's set to input, but it does
>and it stays that way until it is set low.
As I mentioned before, PB6 floating high when set as an input is perfectly
normal behaviour.
What isn't normal is the behaviour you describe when using it as an
output....I wonder, is something somewhere perhaps reprogramming the pin as an
input again after you've set it up (clutching at straws again perhaps)?