OK, here you go - it's a monster! It took me two months to get the board working properly again. Top notes:
- the system architecture is very similar to Bomb Jack, for which schematics are available, so that can help figure out what's going on
- mine has a funny Sega encrypted CPU. Fitting a standard Z80 and replacing the program ROMs on the top board with unencrypted ones from MAME also works.
- The 2K RAM chips are prime suspects for general dodginess
- the graphics hardware has a load of features (like scrolling of the character layer a la Galaxian) which aren't used by the game but can still go wrong. My board had faults which made surreal things happen, like bits of the high score table wandering around. I wish I'd taken videos!
What's up with your board?
Chris
Star Force repair log
1/9/2012
Board serial number 0530 or A-15911
Examine board. Looks OK but audio power amp chip B1
has been forcibly removed from the board.
Pinout is conveniently the same as Bomb Jack. Borrow
Bomb Jack's JAMMA adapter.
Power up. Screen is full of white/yellow/cyan junk.
Main CPU, P4, is a Sega 315-5069, encrypted Z80. Check reset
on pin 26. It's waggling up and down. Watchdog barking?
Remove P4 from its socket. It has many broken legs.
Repair legs with bits of wire and fit chip into a sacrificial
socket. No change in symptoms.
Undo ribbon connectors in turn. Watchdog reset signal seems
to be coming from board B.
On board A, reset signal comes from P3 pin 7 (74LS08)
from S3 pin 10 (74LS00)
from S2 pin 8 (74LS293)
Interestingly, pin 24 of P4 (nWAIT) is stuck low. Forcing it
high makes for some bus activity in between watchdog resets.
nWAIT comes from J5 pin 10 (74LS02). J5 pin 9 is at 1V, rather
indeterminate logic state. Fed from L4 pin 9 (74LS74). L4's
outputs are inconsistent - both Q and nQ are low-ish.
Replace L4. Has 1nF to ground on pin 5, 200pF to ground on pin 2.
nWAIT is no longer stuck low and there is bus activity in
between watchdog barks. Watchdog is still barking though.
Oddly, Z80 at H1 (sound processor?) appears to have no clock.
Check watchdog reset. Pins 12 and 13 of 74LS293 S2 (reset)
go to pin 8 S3 (74LS00). Pin 10 pulled up by R45, linkable low
by J1 (watchdog disable?). Pin 9 goes to 74LS08 T3 pin 8.
T3 pins 9 and 10 go to 74LS139 R3 pins 5 and 11.
74LS139 A and B inputs are active but gate inputs are high.
Gate inputs come from M3 pins 8 and 11 (74LS32).
Probing around M3, pin 4 is at indeterminate level. Trace
where it comes from: another 74LS74, F6. Replace it. Screen
now turns mostly black after reset but watchdog is still barking.
Another indeterminate logic level: K3 pin 2. Appears to be one
of F1's address lines. Trace F1's clock: comes from K4 pin 8
(74LS04). Input to K4 comes from H5, another LS74. Clock input
looks OK. Replace chip. F1 now has clock. Watchdog still barking.
Look for more logic halves: K4 pin 3 has one. Trace track. Goes
only to unfitted chips.
Look at R3's gate inputs. They come from 74LS32 M3 pins 8 and 11.
Inputs on 9 and 12 are high. They come from LS138 M4 pin 13.
M4 pin 2 is low. Force it high and pulses appear at pin 13. Screen
display goes black too. M4 pin 2 comes from S5 pin 7 (74LS367).
Remove watchdog disable (J1) and activity returns to all pins
of S5.
Just out of interest, try piggybacking RAMs at R8 and N8.
Replacing N8 with 6116 makes game run! Though screen is upside down,
some text wanders side to side, graphics are all messed up,
coin/start buttons seem mixed up and joystick right doesn't work.
Check inputs. 'Coin' and 'Start' inputs are swapped over relative
to Bomb Jack.
Coin: N2 pin 2
Right: R2 pin 2
Chips seem to be doing the right things, gating the switch inputs
through to their outputs, but coin input is sluggish for a few
seconds after switch-on. Right now works OK after poking with scope.
Check screen orientation. Put board in cocktail mode (SW1 bit 7 off)
and screen flips correctly between players. Maybe it's just designed
to be the wrong way up. Screen flipping is controlled by 74LS86
B3-D3-E3 on board B.
Looking at background graphics, it seems that there's something wrong
with the tiles. What should be black or just stars has grey/pink
landscape parts all over it.
Flickery pink mess is strongly affected by applying fingers to EPROMs
on board C. Address bits A5, A6, A12, A9, A11, A10 all floating.
They seem to come from latches P5, N5 (74LS273). Piggybacking them
helps. Replace both. Background tiles are now correct but somehow
displaced horizontally and vertically and scrolling is not smooth.
Character layer is still a bit scrambled and sprites are only showing
every other line.
Both tile layers are offset to the right by the same amount.
Tile RAM seems to be N4. Trace A7, pin 1. Goes to L3 (74LS157) pin 4.
Pin 3 seems to go to row counter, pin 2 to CPU address bus. Pin 1 selects
'counter' 32 times per video line.
Counter (bit A7) comes from 74LS273 at H3, pin 19.
H3 pin 18 also goes to K3 (74LS273) pin 18 and K2 pin 10 (74LS283)
K2 is an adder. Piggybacking J2/K2/L2 makes no difference.
Pins 3 and 5 of K3 are stuck high. Forcing them low pulls the tiles
in the right direction.
K3 pin 3 comes from K1 pin 15 (74LS273). Seems to be working.
K1 pin 14 goes to H1 pin 6 (74LS08) which only seems to be a buffer.
H1 pin 5 goes to F1 pin 4 (74LS245). Gets gated once per frame. Piggybacking
doesn't help.
N4 address bits:
A0 8 N3/7 6
A1 7 N3/9 10
A2 6 N3/12 13
A3 5 M3/4 3
A4 4 M3/7 6 H3/12
A5 3 M3/9 10 H3/15
A6 2 M3/12 13 H3/16
A7 1 L3/4 3 H3/19
A8 23 L3/7 6
A9 22 L3/9 10 GND
A10 19 L3/12 13
Why is L3/10 grounded? and N3/3 high? They're wired that way.
Having removed L3 and N3 to investigate, put them back. Picture has gone
odd with a blanking problem. Discover that a mod wire from 60-way connector
has come adrift and is contacting the wrong place. Discover also a broken
track underneath it. Deliberate? Remake it. Lots of random-ish tiles appear
in places they shouldn't. Not good.
Things don't look quite right around RAMs H2/F2. Replace F2 and background
tiles are now correct, though text layer is still thoroughly scrambled.
Replace character RAM on board C B7. No change in character corruption.
Experiment with swapping 6148 sprite RAMs. No change in stripiness.
No activity on I/Os of P3. They're connected to Ys of 74LS258 R3.
All A inputs of R3 are stuck low. A/B pin 1 is stuck low too.
R3 and R4 A/B inputs from from 74LS27 T5 pin 6. Inputs to T5
(pins 3, 4, 5) are crazy: one stuck high, other two mostly high.
Pin 5 comes from R4 74LS258 pin 11 (input) and T6 74LS157 pin 11
and S4 (74LS175) pin 11.
T5 pin 4 to T6 pin 2 and S4 pin 3
T5 pin 3 to T6 pin 5 and S4 pin 6
Piggybacking S4 fixes the sprites
Investigate character RAM B7
A0 8 H0 B6/7
A1 7 H1 B6/9
A2 6 H2 B6/12
A3 5 H3 C6/4
A4 4 H4 C6/7
A5 3 V0 C6/9
A6 2 V1 C6/12
A7 1 V2 D6/4
A8 23 V3 D6/7
A9 22 V4 D6/9
A10 19 Select attribute RAM? D6/12
B6, C6, D6 are 74LS157. Hold select high (pin 1) and CPU can't write to
character ram, it's readout only. For some reason V0-V4 scroll about on
some columns, messing up the text display. Why? Where do they come from?
D6/10 (V4 read address) comes from E6/10 74LS283 adder. E6/11 has
vertical counter squarewave, E6/12 has some data on it. Probably shouldn't
have. Goes to CN1 pin 43, to board A and CN3 pin 40ish to board C.
Board C: K1/18 (input to latch 74LS273)
N1/6 (74LS163 data input D)
R1/6 (74LS163 data input D)
H1/11 (74LS08 output)
H1/11 is being used as a buffer because pin 13 is wired high
H1/11 pin 12 has data. Where from? Appears to be RAM H2. Replacing
it doesn't help. Bus buffer F1 (74LS245) is also connected. Poor
logic levels on its north side. Interestingly, grounding them also
corrupts the text. Could the text and scrolling corruption be connected
by this bus?
Also connected to F3 (tile palette), L4 (tiles), R5 (back tiles)
Check RAM H2. Address pins A6-A9 all wired low. A5 (pin 2) seems stuck high.
Comes from 74LS157 D2 pin 12, Y3 output. B3 input pin 13 is indeterminate level.
Grounding it improves the text a lot. Goes to CN4 thence board B.
Broken track! Repair it. Text is now in the right places but still suffers
from random-ish corruption.
D7 pin 17
D4 14 A8/5 and B8/13
A8 is 74LS245 bidirectional bus buffer
B8 is 74LS273 latch reading data from RAM
Try replacing A8. Doesn't help. Even with A8 removed, screen doesn't clear
uniformly on startup. Writing to character RAM is just unreliable.
nWE on RAM B7 is wired straight to nOE on buffer A8. Leaves no data hold
time on writes.
Where is the data for this bus coming from? Should be a buffer to CPU data
bus if it's anything like Bomb Jack. Yes, M6 on PCB A (74LS245) has the same
signals on it. Pins 11 and 14 seem to be pulled high and the others aren't.
Forcing nOE (pin 19) high has the same result: 11 and 14 high, the others
indeterminate. Where's that coming from? Also turns up on 74LS373 at L3.
Removing connectors to board B leaves the signals in the same odd state, so
the strangeness is probably coming from board A. Replace M6 and L3. Doesn't
make any difference.
These bus signals also turn up on 74LS258s P2 and N2. There are some problems
with controls, so maybe these have something to do with it? Remove all 5
of the 74LS258s. Text is still corrupted but the white crosshatch is now
white and not partially cyan. Bus signals also look all the same now so
something has improved.
By a process of elimination identify two faulty 74LS258s. The crosshatch is
now all white but still has a step in the middle and 'Star Force' logo
is still messed up. Is the Star Force logo from text RAM or tile RAM? Messing
with tile ROMs on board C while logo is displayed doesn't have any effect, so
it's probably the text RAM.)
Even after replacing the two obviously faulty 258s, controls don't all work
properly. Replace the rest of the 258s and now all controls work though
coin input is slow to respond after board is switched on. Odd.
Coin input is on N2 pin 2. Select (pin 1) and output enable (pin 15) signals
look OK. Output at pin 4 does the right thing in response to button presses.
Seems to be a bus signal. Also turns up at 74LS373 L3 pin 3 (D0 in) and
74LS245 M6 pin 11 (D0 in/out). Trace M6 pin 9 to Z80 pin 14, which is indeed D0.
Monitoring it triggered from read signal on N2 shows that it is doing the right
things but CPU isn't taking notice of it. Hardware seems to be working OK.
1/10/2012
Try to sort out character RAM corruption. 74LS157 B6/C6/D6 on board B are
suspect because they handle address lines to the RAM B7. Replace them all.
Makes no difference so put the old ones back in.
Where does select signal on pin 1 come from? 74LS08 B5. Has mod wires on it.
Looks like it's doing sensible things though.
2/10/2012
Investigate character problems further. Playing with MAME debug, characters
are at 0x9000 and character attributes at 0x9400. The corruption we're seeing
does seem to be in the attributes, though there are occasional errors in the
characters themselves.
Experiment with EPROMs on board B. ROMs 6, 7 and 8 are definitely the character
ROMs.
RAM B7 write enable (pin 21) comes from 74LS157 B6 pin 4. B6 pin 2 (write input)
comes from 74LS32 C5 pin 11. Piggybacking C5 makes no difference.
Try replacing RAM. It's a 150ns part so 6116s are not fast enough. Bodge in a
120ns 62256. Problem is unchanged.
3/10/2012
If it's data bus corruption, suspect 74LS273 latches at B8 and C8 which latch
data out from RAM B7. Replace them: no difference. While fiddling around observe
that column 17 of text is offset vertically by half a character. Could this
be connected?
7/10/2012
Investigate offset column of text. Suspect duff inputs to adders. Character
RAM address lines:
RAM pin mux adder
A0 8 H0 B6/7
A1 7 H1 B6/9
A2 6 H2 B6/12
A3 5 H3 C6/4
A4 4 H4 C6/7
A5 3 V0 C6/9 F6/10
A6 2 V1 C6/12 E6/4
A7 1 V2 D6/4 E6/1
A8 23 V3 D6/7 E6/13
A9 22 V4 D6/9 E6/10
Adder F6 pin 14 has a pulse on at the time when the offset column is displayed.
Grounding it shifts the column back into the right place but messes up the
background scrolling. Signal comes from CN-1 pin 38 which goes nowhere on board
A. Also appears on CN3 pin 28 to board C. 74LS273 K1 pin 7 has the signal on it.
This is an input. Also on 74LS163 S1 and P1 pin 5. They are also inputs.
Output is from 74LS08 J1 pin 8. Input to that gate is pin 9 which comes from
74LS245 F1 pin 7. This seems to be disabled most of the time. Also goes
to RAM F2 pin 13. Faulty RAM? Replace it and text offset has gone.
Text corruption is still there though!
Back to corruption problem.
Write enable to character RAM B7 comes from 74LS157 B6 pin 4. Has already been
replaced. Input to mux is on pin 2. Comes from 74LS32 C5 pin 11.
pin 12 seems to be standard write enable, and pin 13 seems to be decoded
address. Piggybacking C5 doesn't help. pin 13 goes to CN1 pin 12.
Ends up at 74LS138 M5 on board 1, pin 13. Piggybacking that doesn't help
either.
8/10/2012
On Bomb Jack, there's an arrangement to insert wait states if CPU access
to video RAM clashes with display scanning. Maybe Star Force has something
similar which isn't working. Trace nHALT pin (24) of CPU. Goes to 74LS02
J5 pin 10. Just like Bomb Jack! Trace inputs to gate (pins 8 and 9)
pin 9 goes to 74LS74 L4 pin 9. 8 to L4 pin 2 and 74LS08 P3 pin 10
and 74LS32 P6 pin 6 (OR gate output).
Replacing L4 doesn't help. There seem to be a lot of short (sub 50ns)
pulses around on P6 and P3. Where are they coming from? P6 is
very interconnected with 74LS27 P5, which in turn gets signals from
74LS138 N5. P5 pin 11 has indeterminate rubbish on it. Goes to CN1 pin 23.
Trace on board B. Goes to via under L1 but doesn't seem to emerge on other
side of board. Bad via under L1. Fix it but the text corruption is still there.
9/10/2012
Monitor write signal to character RAM (pin 2 of B6) and switching signal
which swaps address bus of character RAM from CPU to counters. It seems
that sometimes the CPU tries to address RAM while the muxes are in
'counter' mode, but only when writing a lot of text such as star force
logo or high-score table. Force switching signal (B6 pin 1) high and
CPU can't write to character RAM. Force it low and readout can't happen.
Holding it low doesn't and waiting for a screen update (eg logo to be
drawn) still leaves the screen corrupted when I let go of it. So it's
probably not an address-multiplexing issue.
27/10/2012
Give up on character RAM problem for now and investigate sound. Sound power
amp chip is missing. Try replacement M51516 but DC levels are all wrong so
replacement is probably faulty. Hook up temporary amplifier. There's a little
blip at startup so analogue stuff is obviously doing something. No game sounds
though. Try piggybacking RAMs at K2/J2. Results in random sounds while I'm
fiddling with the chips.
Check activity on 76489 sound chips C8/D8/D7. D7 has a floating ground pin.
Remove and clean socket. Pins 1 and 8 both snap off. All pins are extremely
fragile. Fit it in a sacrificial socket.
There seem to be no interrupts to the CPU. NMI is wired high, IRQ goes to
F3 pin 23 (Z80-PIO). According to MAME source, PIO port A is sound data from
main CPU. Examine it. There's data on PA0-PA7 which looks suspiciously like
the data bus to the graphics too. And nAOE pulse each time a sound should be
generated. But there's no interrupt output. nCE seems awfully busy. Comes
from 74LS08 K3 pin 11. It's just a buffered version of A3. Seems to be
little or no activity on nIRQ. Replace CPU, makes no difference.
Remove Z80-PIO F3 and socket it in preparation for a replacement. Meanwhile,
check nIORQ line. It definitely goes active after reset, so the CPU is trying
to set up the PIO and CTC. CTC seems to be doing the right things: timer 1
outputs 15.625kHz, timer 2 outputs 89Hz-ish, timer 3 outputs 5kHz-ish.
Interrupt enables seem to be daisy-chained so CTC can never generate an
interrupt because interrupt enable out of PIO is stuck low. It never goes
high even during reset.
While resetting board observe that grid at startup has now a tendency to be
yellow instead of white.
7/11/2012
Replace Z80-PIO F3. Sound now appears correctly through temporary amplifier.
Replace M51516 power amplifier chip with a new one and we now have correct
sound through the speaker. Irritating character layer corruption is still
there, though!
14/11/2012
In an effort to track down character corruption, program a set of decrypted
ROMs (2-3-4-5) for board 1 and replace CPU with standard Z80. Edit first ROM
so that it repeatedly writes the crosshatch pattern to the screen in the
hope of seeing corruption during writes. But crosshatch appears perfectly
every time with no flickering apparent.
Maybe we need a better test pattern.
Write a test ROM which draws the grid, then writes 0x0f into every attribute
memory location, waits for vsync, writes 0xf0 into every attribute memory
location, waits for vsync, and repeats. Works perfectly. So the problem
must be somewhere else. Maybe writing to other memory locations causes
spurious writes to the character/attribute RAM? Search for where text is
drawn on screen?
Create a ROM which stops after drawing 'Star Force' logo. It shows the
corruption. Put it into a loop. Logo now appears perfectly. I was expecting
flickering corrupt bytes but they're not there. What's going on? It's as if
sometimes a write fails, rather than writing the wrong data.
15/11/2012
Examine write cycles to character RAM with storage scope. Sometimes there is
a very short nWE pulse, less than 100ns. Only seems to occur when pin 1 of
data selector B6 is low, as it should do.
Trace write enable back to 74LS32 C5. It's pin 13 that's terminating the
short write pulses, which is address decode from board 1 M5 pin 13. Seems
to be chip enable on M5 (74LS138) pin 4 that's the source of the short
pulses. Goes to M4 pin 4 (74LS138) and 74LS32 N4 pin 8. Errant edge is
on pin 9. Comes from P3 pin 8. Errant edge is P3 pin 9. Comes from
L4 (74LS74) pin 5 which goes high at the edge. D input on pin 2 is
also high at the time but has a glitch after it. Comes from P6 pin 6
(74LS32). Glitchy input is on pin 5, which comes from 74LS27 P5
pin 7. Input on pin 3 is distinctly suspect. Goes to 4th pin down,
board edge, CN1.
Goes to board 2 J3 pin 3, 74LS08.
16/11/2012
Board 1 N5 (74LS138) seems to be the equivalent of 5M on Bomb Jack - ungated
address decoder. Pin 13 is low for character RAM access. Goes to P5 pin 4.
P5 inputs:
4 n9000CS
5 HBLANK
3 1.5MHz 25% duty cycle with a big glitch
In desperation, try to get rid of the big glitch. Shove 1nF between P5 pin 3
and ground. Text corruption has now gone away! But why was it there in the
first place? Check board 2 J3. Edges on pin 2 look a bit slow. Comes from
C3 (74LS08) pin 11. Input to that chip looks OK. Piggyback it and waveform
improves. Remove bodge capacitor...fault has gone! Replace chip properly.
Fault comes back. Apply brute force: fit a 74F08 in position C3. Fault fixed.
Now there's a sound fault because legs are still falling off one SN76489
sound chip. Repair it with dremel and solder.
Replace original encrypted CPU and ROMs. Game still works.