Previous Thread
Next Thread
Print Thread
Page 5 of 6 1 2 3 4 5 6
Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
I got tired of having to put the same DEBUGNLAO in two places, so why not put it in an include file?

inside class tank_state : public driver_device

Code
#define DEBUGNLAO(x,y) NETDEV_ANALOG_CALLBACK_MEMBER(update_##x) {printf("UPDATE " #x ": %f  "#x"= %f\n",time.as_double(),data); }
#include "nlao.h"
#undef DEBUGNLAO


inside void tank_state::tank(machine_config &config)

Code
#define DEBUGNLAO(x,y) NETLIST_ANALOG_OUTPUT(config, "maincpu:"#x, 0).set_params(#y, FUNC(tank_state::update_##x));
#include "nlao.h"
#undef DEBUGNLAO

and then in nlao.h I put the things I want to watch:

Code
DEBUGNLAO(fire1,FIRE1)
DEBUGNLAO(shell1,SHELL1)
DEBUGNLAO(c9_14,IC_C9.14)
DEBUGNLAO(c9_13,IC_C9.13)
DEBUGNLAO(c9_15,IC_C9.15)
DEBUGNLAO(c9_11,IC_C9.11)


I tried everything I could think of to make the tanks stop jumping around, finally I figured that if you hardwire the stop code to the counter you can make it stop:

These values were found by experimentation:

Horizontal load: I think it should be 0x78 but seems to hold steady if I load it with 0x7c. (0x400 - 0x78 = 904) (0x400 - 0x7c = 900)

NET_C(GND, IC_A1.3)
NET_C(GND, IC_A1.4)
NET_C(P, IC_A1.5)
NET_C(P, IC_A1.6)

Vertical load:
I think it should be 0xdf8, but it seems to stop moving if I load it with 0xdf7
(0x1000-0xdf8 = 520) (0x1000-0xdf7 = 521)

NET_C(P, IC_A2.3)
NET_C(P, IC_A2.4)
NET_C(P, IC_A2.5)
NET_C(GND, IC_A2.6)

The reason the right tank moves up and down is that I fixed the horizontal load but not the vertical load.



No matter what I try, I can't seem to make the 9602 fire.

Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
Took a look at some of the other atari ttl games and it's super cool that a lot of them have detailed manuals. It's useful to read other manuals for the mechanics of each of these games have significant similarities.

I got interested in Atari Anti aircraft and it looks very doable. It seems a bit simpler than other games, so I'll see if I can make it work with netlist.

It only has one rom for the aircraft and a UFO
Code
> for i=0,#d-1 do prtbyte(i,d:byte(i+1)) print() end
0:   43210
1:  5   1 
2:  5  2  
3:  5 3   
4:  5 3   
5:  5 3   
6:  5 3   
7:  543   
8:  543   
9:  54 2  
a:  54 2  
b:  54    
c:  5 3   
d:  5 3   
e:   4    
f:   4    
10:        
11:   43   
12:   43   
13:   43   
14:  543   
15: 6 432  
16: 6543 1 
17: 6 43  0
18: 6543  0
19: 6 43  0
1a: 6543 1 
1b: 6 432  
1c:  543   
1d:   43   
1e:   43   
1f:   43   


It's quite interesting to study the history of Atari TTL games, turns out there was a company called Fun Games Inc. that copied Atari's Tank game

from http://www.atarihq.com/pongtest/aboutbreakout.php
Quote
Engineering started on the concept as well as several other games, including a new military game called Jet Fighter by Lyle Rains. Unfortunately during the process, several of the engineers became disillusioned with Atari and the management and thought they could do a better job. Taking plans and parts from Atari, they started up their own company - Fun Games, Inc.

With the plans and parts stolen, Fun Games released an exact copy of Bristow's Tank by the end of the year, even calling it Tankers. But it was the game announced that year and another released next year that proved their downfall. Released at the same time as Tankers, Take 7 was a compendium of six of Atari's previous PONG efforts and included one extra game called "Bust Out", where a player used a paddle and ball to break through a multi-segmented wall. Bust Out was in fact Breakout. In 1976 they released Race!, a copy of Gran Trak 10, and Biplane, a copy of Lyle's just released Jet Fighter that replaced the jets with biplanes. Atari had enough and sued Fun Games over the Jet Fighter rip off, with Steve Bristow and others testifying. Easily winning the suit, 1976 was the last year a game with the Fun Games banner was released. The damage was done however, and development on Breakout had been stalled during the process.

Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
Got the Antiairc score working and the launchers showing. Don't know why there's 3 vertical copies though.

Finally figured out what "Display Monitor Sliders" does in the Machine Configuration for fixed frequency monitors: It will ignore the sliders when this is set to off.

The score display circuit in stunt cycle and antiairc are very similar, however, stunt cycle uses the YQ output and antiairc uses the Y output. That took me a while to realize what was wrong.


Joined: Jan 2011
Posts: 251
Likes: 3
Senior Member
Offline
Senior Member
Joined: Jan 2011
Posts: 251
Likes: 3
There may be a Fun Games Biplane rom around.
I thought I remember having a board set.

I also still have a PSE Game Tree board set I need to dump.

Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
Looking around I think there's a dump of biplane in src/mame/misc/fungames.cpp,

I think there's also one of gametree in src/mame/misc/pse.cpp

There's a manual for gametree and it looks interesting.

Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
Looking at the roms for outlaw and qwak:
Code
out = io.open("/mnt/z/mame/roms/outlaw/0003323.j4","r") o = out:read("*a")
function prtbyte(adr,a) if adr then io.write(string.format("%x",adr)..":") end for i=7,0,-1 do if (a & (2^i)) ~= 0 then io.write(i) else io.write(" ") end end en
for image=0,7 do for line=0,31 do for lr=0,1 do adr=line | lr << 5 | image << 6 prtbyte(nil,o:byte(adr+1)) end print() end end
7654321076543210
7654321076543210
765432  76543210
7654      543210
765432  76543210
765432  76543210
765432 076543210
76543    6543210
7654      543210
7654       43210
765  2      3210
765 32    5  210
765 32    54 210
765 32    54 210
765 32    54 210
765 3     543210
76543     543210
76543  0  543210
76543  0  543210
7654   0  543210
7654  10  543210
7654  10  543210
7654  10  543210
76543  0  543210
76543     543210
765432    543210
765432    543210
765432 0 6543210
76543 10 6543210
76543210 6543210
7654321076543210
7654321076543210
7654321076543210
76 43 1076543210
7    21076543210
76  321076543210
76 4321076543210
7 543210765 3210
76543210765 3210
765  210765 3210
765   10765 3210
7654  1076  3210
76543      43210
7 543     543210
7 54     6543210
7 5      6543210
7   3    6543210
76543    6543210
76543    6543210
76543    6543210
76543     543210
7  43      43210
76 43   7    210
76 432  76    10
765432   654  10
7654321  654  10
7654321  654  10
7654321  654  10
7654321  654  10
765432  7654  10
765432  76543 10
765432 0765432 0
765432 076543210
7654321076543210
76543210765432 0
7   3 1 76   2 0
76 43 1 765 32 0
76 43 1 765 3210
76 43 1   5 32 0
7654321076543210
7654321076543210
7654321076543210
7654321   543210
7654321   543210
7654321   543210
7654321   543210
7654321   543210
765432     43210
765432     43210
765432 0 6 43210
76543  0 6  3210
7654  10 65  210
765   10 65   10
76  3210 6543  0
7654321076543210
7654321076543210
7654321076543210
7654321076543210
      1   5   1 
 6 4 21 7 5 3 1 
   4 21   5   1 
 6 4 21 7 5  21 
 6 4 21 7 5 3 1 
7654321076543210
7654321076543210
7654321076543210
7654321076543210
7654321076543210
7654321076543210
7654321076543210
7654321076543210
7654321076543210
7654321076543210
76543  076543210
765      6543210
76543  076543210
76543  076543210
76543 1076543210
765    076543210
76      76543210
7        6543210
7         543210
7      0  543210
765    07 543210
765     7  43210
765      6  3210
765  21   543210
765  210   43210
7654  107  43210
7654  10   43210
7654  10  543210
765  210 6543210
76  3210 6543210
76 432107 543210
76 4321076543210
7654321076543210
7654321076543210
7654321076543210
7654321076543210
7654321076543210
7654  1076543210
76      76543210
7654  1076543210
7654  1076543210
76543  076543210
76543     543210
7 543   7  43210
7  43     543210
76       6543210
7654     6543210
76543    6543210
7654      543210
76        543210
7     10  543210
7   3210  543210
76  3210   43210
76  32107  43210
76   2107   3210
765  21076   210
765  210765   10
765  2107654   0
765  21076543  0
76   210765432 0
76543210765432 0
7654321076543210

...3 more running images...



qwfile = io.open("/mnt/z/mame/roms/qwakttl/90-2002.9k","r") q = qwfile:read("*a") print(#q)
hlist = { 0, 3, 2, 1}
for image=0,7 do for line=0,15 do for h=0,3 do adr = line| hlist[h+1] <<6 | (image&3) <<4 | ((image&4)>>2) << 8 prtbyte(nil,q:byte(1+adr ))end  print() end end
                                
                                
                                
               0                
 654          107         543210
   432107    21076    1076543   
     210765432  7 543210765     
        7654321076543210        
           432107654            
               07               
                7               
                7               
                                
                                
                                
                                
                                
                                
                                
                                
                                
    32         0         654    
     21076    107   321076      
        76543210765432          
           432107654            
               07               
                7               
                                
                                
                                
                                
                                
                                
               0                
              107               
             2107654            
         65432  7 54321         
        7654321076543210        
       0765432107654321076      
      1076     07     10765     
     2107       7       7654    
    321         7        654    
    321                   543   
   43                      43   
   43                       32  
  54                         2  
                                
                                
                                
                                
                                
                                
               07               
            32107654            
           4321076543           
          543210765432          
         6543   7   321         
        765     7    210        
        76            10        
       07              07       
      10                76      
                         6      
                                
                                
                                
               0 6              
            3  0 6  3           
            3 10765 3           
            3 10765 3           
            3 10765 3           
            3 10765 3           
            321076543           
             2107654            
              10765             
               076              
                7               
               076              
               076              
                7               
                7               
                                
      107                       
    321076                      
    3210765                     
      10765432107654321         
       07654321076543210765432  
        7654321076543210765     
        7654321076543210        
        76543210765432107       
       0765432107654321076      
      10765           10765     
     210                  543   
    32                       2  
  54                            
                                
                                
                                
           43              43   
           4321            4321 
          54              54    
         65              65     
        76              76      
       076             076      
     21076           21076      
    321076          321076      
   4321076         4321076      
 654321076       654321076      
 65432107        65432107       
  543210          543210        
    3 1             3 1         
    32107           32107       
                                
                                
                                
       076                      
      107654321076543           
     2107654321076543210765432  
     2107654321076543210765     
         6543210765432107       
          5432107654321         
          543210765432          
           432    543           
            321   54            
             21  65             
              1 76              
              107               
               07               
                                



1 member likes this: wolfi
Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
Playing with shark jaws roms:
Code
sharkf = io.open("/mnt/z/mame/roms/sharkjaws/004182.da1","r") s = sharkf:read("*a") print(#s)
sharkf2 = io.open("/mnt/z/mame/roms/sharkjaws/004183.db1","r") s2 = sharkf2:read("*a") print(#s2)

function prtbytewide(adr,a,wide) if adr then io.write(string.format("%x",adr)..":") end for i=7,0,-1 do for dup = 1,wide do if (a & (2^i)) ~= 0 then io.write(i) else io.write(" ") end end end end

for image = 0,1 do for line=0,15 do for h = 0,3 do adr = h<<5 | line<<1 | image << 7   prtbytewide(nil, s:byte(adr+1) << 4| s:byte(adr+1+1) << 0, 4) end print() end end  -- shark
for image = 0,1 do for line=0,15 do for h = 0,3 do adr = h<<5 | line<<1 | image << 7   prtbytewide(nil, s2:byte(adr+1) << 4 | s2:byte(adr+1+1)<<0,2 ) end print() end end  -- diver

Code
> for image = 0,1 do for line=0,15 do for h = 0,3 do adr = h<<5 | line<<1 | image << 7   prtbytewide(nil, s:byte(adr+1) << 4| s:byte(adr+1+1) << 0, 4) end print() end end  -- shark
                                        5555                                                                                    
                                        55554444                                                                                
                                        555544443333                                                                            
                                        55554444    2222                                                                        
7777                                    55554444333322221111                                                                    
7777                            7777666655554444333322221111000077776666                        7777            33332222        
77776666                111100007777666655554444333322221111000077776666555544443333            77776666    44443333    1111    
777766665555        222211110000777766665555444433332222111100007777    55554444333322221111    77776666555544443333222211110000
77776666555544443333222211110000777766665555444433332222111100007777666655554444333322221111000077776666    44443333222211110000
77776666555544443333222211110000                            00007777            333322221111    7777            333322221111    
777766665555444433332222111100007777666655554444333322221111000077776666            2222                                        
7777666655554444333322221111000077776666555544443333222211110000777766665555                                                    
77776666                    0000777766665555444433332222111100007777666655554444                                                
7777                            7777666655554444333322221111000077776666555544443333                                            
7777                                                                                                                            
                                                                                                                                
                                        5555                                                                                    
                                        55554444                                                                                
                                        555544443333                                                                            
                                        5555444433332222                                                                        
    6666                                55554444333322221111                                                                    
    6666                        7777666655554444333322221111000077776666                        7777            33332222        
    66665555            11110000777766665555444433332222111100007777666655554444                77776666    44443333    1111    
    666655554444    222211110000777766665555444433332222111100007777    555544443333            77776666555544443333222211110000
    6666555544443333222211110000777766665555444433332222111100007777666655554444333322221111    77776666    44443333222211110000
    6666555544443333222211110000                            000077776666    444433332222111100007777            333322221111    
    666655554444333322221111000077776666555544443333222211110000777766665555    333322221111                                    
    6666555544443333222211110000777766665555444433332222111100007777666655554444    2222                                        
    66665555                00007777666655554444333322221111000077776666555544443333                                            
    6666                        777766665555444433332222111100007777666655554444                                                
    6666                                                                                                                        
                                                                                                                                
> 
> 
> 
> for image = 0,1 do for line=0,15 do for h = 0,3 do adr = h<<5 | line<<1 | image << 7   prtbytewide(nil, s2:byte(adr+1) << 4 | s2:byte(adr+1+1)<<0,2 ) end print() end end  -- diver
                                                                
                                                                
          22                                                    
        33  11    6655443322110077    443322                    
      44      00  66554433221100776655443322                    
                77  554433221100776655443322                    
                  6655443322110077    4433                      
                      44        77          11                  
                    55          77        22                    
                  66              66    33                      
      44        77                  5544                        
    55  33221100                    55                          
          22                      66                            
                                7766                            
                              00    55                          
                                                                
                                                                
                                                                
                                                                
                  6655443322110077    443322                    
                  66554433221100776655443322                    
      44            554433221100776655443322                    
    55  33221100776655443322110077    4433                      
  66                55          77                              
      44          66            77        22                    
    55  3322110077              77      33                      
  66                              66  44                        
                                    55                          
                                  66                            
                                77                              
                              0077                              
                            11    66                            
> 

Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
I came across a Computer Space service manual. I like this in the beginning of the manual:

Call me personally...

[Linked Image from i.imgur.com]



This was on one of the schematic pages:

[Linked Image from i.imgur.com]

Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
After much fiddling, I finally got a "proper" image to display for Outlaw (at least the score numbers and the bar down at the bottom):

[Linked Image from i.imgur.com]


This was pretty frustrating to figure out.

The problem lay in the 74107 netlist. When the counter hits 256 + 128 + 64 + 4 + 1 = 453, it's supposed to set HRESET. This makes HRESETQ low which is supposed to clear the 74107 F3. The HRESETQ clears F3, but the falling 128H that clocks F3 sets the 256H.

[Linked Image from i.imgur.com]

Modifying nld_74107.cpp a bit to check the m_clrQ():


NETLIB_HANDLERI(clk)
{
const netlist_sig_t J(m_J());
const netlist_sig_t K(m_K());
const netlist_sig_t t(m_Q.net().Q());

if (!m_clrQ()) newstate(0);
else if (J & K) newstate(t ^ 1);
else if ((J | K)^1) NULL;
else newstate(J);

// m_clk.inactivate();
// newstate(((t ^ 1) & J) | (t & (K ^ 1)));
}


Before that change I would get only about half of the screen since the HRESET would trigger prematurely:

[Linked Image from i.imgur.com]

In the schematic, there's a resistor R13 that has a value of 10 ohms that's hooked to 5V. That seems way too low. Making R13 have a value of 10K ohms it seems to work better. The 10 ohms value is repeated in the parts list as well.

Joined: Feb 2014
Posts: 871
Likes: 54
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 871
Likes: 54
According to the Outlaw manual, it says that the HSYNC should be about 64 microseconds and the VSYNC should be 16.7 milliseconds. Also the VSYNC should be equal to 4 horizontal lines.

[Linked Image from i.imgur.com]

So let's change our debug net list function to track the amount of time between changes:

We'll use a couple of static variables to hold the previous times, so we can track the 2 most recent changes.

Code
//#define DEBUGNLAO(x,y) NETDEV_ANALOG_CALLBACK_MEMBER(update_##x) { printf("UPDATE " #x ": %f  "#x"= %f\n",time.as_double(),data); }
#define DEBUGNLAO(x,y) NETDEV_ANALOG_CALLBACK_MEMBER(update_##x) { static double last0 = 0.0; static double last1 = 0.0; printf("UPDATE " #x ": %f  "#x"= %f    delta=%f  delta2=%f\n",time.as_double(),data,time.as_double()-last0,time.as_double()-last1); last1 = last0; last0 = time.as_double();  }

and we'll track just the HSYNC and VSYNC signals:

Code
DEBUGNLAO(hsync, HSYNC)
DEBUGNLAO(vsync, VSYNC)


Code
UPDATE hsync: 0.988522  hsync= 3.999999    delta=0.000060  delta2=0.000064  <<< hsync lasts 64 usec
UPDATE hsync: 0.988527  hsync= 0.100000    delta=0.000004  delta2=0.000064
UPDATE vsync: 0.988584  vsync= 3.999999    delta=0.016496  delta2=0.016751   <<< vsync is .016751 or approx 16.7 msec
UPDATE hsync: 0.988586  hsync= 3.999999    delta=0.000059  delta2=0.000064
UPDATE hsync: 0.988591  hsync= 0.100000    delta=0.000004  delta2=0.000064
UPDATE hsync: 0.988650  hsync= 3.999999    delta=0.000060  delta2=0.000064
UPDATE hsync: 0.988654  hsync= 0.100000    delta=0.000004  delta2=0.000064
UPDATE hsync: 0.988714  hsync= 3.999999    delta=0.000059  delta2=0.000064
UPDATE hsync: 0.988718  hsync= 0.100000    delta=0.000004  delta2=0.000064
UPDATE hsync: 0.988778  hsync= 3.999999    delta=0.000059  delta2=0.000064
UPDATE hsync: 0.988782  hsync= 0.100000    delta=0.000005  delta2=0.000064
UPDATE vsync: 0.988840  vsync= 0.100000    delta=0.000256  delta2=0.016751  <<< vsync lasts .000256 or 4 * .000064
UPDATE hsync: 0.988842  hsync= 3.999999    delta=0.000059  delta2=0.000064

so it looks like it's doing the correct thing.


Next up is to write something to handle a 74195 shift register which is used to handle the outlaw status.


1 member likes this: robcfg
Page 5 of 6 1 2 3 4 5 6

Link Copied to Clipboard
Who's Online Now
1 members (nerd4gw), 22 guests, and 3 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,113
Posts119,448
Members5,024
Most Online890
Jan 17th, 2020
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com