Thread Like Summary
=CO=Windler, exidyboy, Just Desserts, R. Belmont, robcfg, Stiletto, wolfi
Total Likes: 20
Original Post (Thread Starter)
#121012 06/13/2022 10:13 PM
by Golden Child
Golden Child
Hi guys,

I got interested in Atari Lemans and was reading the Service Manuals and wanted to see the track patterns in the roms:

After fiddling with lua for a bit I was able to see the track data and the car data in the rom.

I don't know why, but the track doesn't look right unless I remove the 7th horizontal byte.

Code

-- same code but spread out to multiple lines

function prtbyte(b) local i for i=7,0,-1 do if (b & (2^i)) ~= 0 then io.write("*") else io.write (" ") end end end
fnamestable = {"/mnt/z/mame/roms/lemans/005837.n5","/mnt/z/mame/roms/lemans/005838.n4","/mnt/z/mame/roms/lemans/005839.n6"} 
for fni,fn in pairs(fnamestable) do 
f = io.open(fn,"r") a = f:read("*a") 
for z = 0,0x7ff,0x200 do print(fn, z) 
for y=0,31 do for x=0,15 do 
adr = (x | (y<<4)) + z b = a:byte(1+adr) 
if x==0 then io.write("adr:"..string.format("%3x",adr)) end 
if x~=7 then prtbyte(b) end end print() end print(fn,z,"end") end end  
fn = "/mnt/z/mame/roms/lemans/005837.n5"
f = io.open(fn,"r") a = f:read("*a") 
for x = 0,31 do print(fn,x) for y=0,7 do 
adr = (y | (((x & 0x10)>>4) << 3) | ((x & 0xf)<<5)) | (2^9) | (2^10) 
io.write(string.format("%2x",adr).." ") b = a:byte(1+adr) prtbyte(b) 
adr = adr | (2^4) b= a:byte(1+adr) prtbyte(b) 
print("  "..string.format("%2x",adr)) end 
print("------") 
end 


-- same code as a single line

function prtbyte(b) local i for i=7,0,-1 do if (b & (2^i)) ~= 0 then io.write("*") else io.write (" ") end end end
 fnamestable = {"/mnt/z/mame/roms/lemans/005837.n5","/mnt/z/mame/roms/lemans/005838.n4","/mnt/z/mame/roms/lemans/005839.n6"} for fni,fn in pairs(fnamestable) do f = io.open(fn,"r") a = f:read("*a") for z = 0,0x7ff,0x200 do print(fn, z) for y=0,31 do for x=0,15 do adr = (x | (y<<4)) + z b = a:byte(1+adr) if x==0 then io.write("adr:"..string.format("%3x",adr)) end if x~=7 then prtbyte(b) end end print() end print(fn,z,"end") end end  fn = "/mnt/z/mame/roms/lemans/005837.n5" f = io.open(fn,"r") a = f:read("*a")  for x = 0,31 do print(fn,x) for y=0,7 do adr = (y | (((x & 0x10)>>4) << 3) | ((x & 0xf)<<5)) | (2^9) | (2^10) io.write(string.format("%2x",adr).." ") b = a:byte(1+adr) prtbyte(b) adr = adr | (2^4) b= a:byte(1+adr) prtbyte(b) print("  "..string.format("%2x",adr)) end print("------") end 
/mnt/z/mame/roms/lemans/005837.n5	0
adr:  0 *  **** *       * *     * *   * * *  *  **   *  ***  * *     ***  *  ***  *  * * *   * * **  * * **   ** **    **      
adr: 10**  ******  *** * ***** * **** ** ****  * * **  *  ***  *   * ** **** ** *****   ** **   * ***   * *** * * ****  *  *** 
adr: 20*   ****            * * * * * * * * * * * * * * * * * * * * * * * * * * * *                                             
adr: 30                  *                      ****  *                            *                                           
adr: 40                 *               ** ** * ****  *                              *                                         
adr: 50                 *                       ****  *                 ** ** *        *                                       
adr: 60                 *                       ****  * ** ** *                          *                                     
adr: 70                 *          * * * * * * * * * * * * * * * * * * * * * * *           *                                   
adr: 80                 *         *      ***  *           *   *                  *           *                                 
adr: 90                 *         *      ***  *            * *                     *           *                               
adr: a0                 *         *       * * * * * *       *       * * * *          *           *                             
adr: b0                 *         *                   *           *         *          *           *                           
adr: c0                 *         *                    *          *           *         **          *                          
adr: d0                  *         * * * * * * *         *        *            *        *  *        *                          
adr: e0                   *         *    *       *         * * * *      *      *        *   *       *                          
adr: f0                     *         * *          *                    *      *        **  *       *                          
adr:100                       * ** ** * *            *                 *       *        *   *       *                          
adr:110                       * ** ** * *      *       * * * * * * * *        * *        * *        *                          
adr:120                     *         *       *  *                           *   *      * **  *     *                          
adr:130                   *         *        *     *                       *       *    * **  *    *                           
adr:140                  *         *        * * * * * * * * * * * * * * * * * * * * * * * * * * * *                            
adr:150                 *         *       *                       **  * ** ** *                    *                           
adr:160                 *         *      *                        **  * ** ** *                     *                          
adr:170                 *         *      *     ********************************************         *                          
adr:180                 *         *           *    *  *                    *  *            *        *                          
adr:190                 *         *           *    *  *                    *  *            *        *                          
adr:1a0                 *          * * * * * * ********************************************         *                          
adr:1b0                 *               ***** *                                                     *                          
adr:1c0                 *               ***** *                                                     *                          
adr:1d0                 *               ***** *                                                     *                          
adr:1e0                  *              ***** *                                                    *                           
adr:1f0                    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                             
/mnt/z/mame/roms/lemans/005837.n5	0	end
/mnt/z/mame/roms/lemans/005837.n5	512
adr:200 *  **** *       * *     * *   * * *  *  **   *  ***  * *     ***  *  ***  *  * * *   * * **  * * **   ** **    **      
adr:210**  ******  *** * ***** * **** ** ****  * * **  *  ***  *   * ** **** ** *****   ** **   * ***   * *** * * ****  *  *** 
adr:220*   ****            * * * * * * * * * * * * * * * * * * * * * * * * * *           * * * * *                             
adr:230                  *                              ****  *               *       *            *                           
adr:240                 *                               ****  *                *    *               *                          
adr:250                 *        * * * * * * * * * * * * * * * * * * * *        * *        *       *                           
adr:260                 *         *                 *                   *       *        *       *                             
adr:270                 *         *              *                       *             *       *                               
adr:280                  *       *            * ** ** *    * * * * *       *         *       * * * *                           
adr:290                   *     *          *           *             *       *     *       *        *                          
adr:2a0                  *       *      *           *                 **       * *       *          *                          
adr:2b0                 *         *  *           *         * * *      *  *       *                  *                          
adr:2c0                 *         **          *  ***  * *             *    *      *          *      *                          
adr:2d0                  *       *         *         *  ** ** *      *       *     *       * *      *                          
adr:2e0                   *     *        *        *         * * * * * * * * * *      * * *   *      *                          
adr:2f0                  *       *       *        *       *       *       **  * *     *      *      *                          
adr:300                 *         *       * *       *      *    *         **  *  *     *     *      *                          
adr:310                 *         *       *   *      *      *  *      * * *       *     * * *       *                          
adr:320                  *       *       *     *      *      **      *     *       *    * **  *     *                          
adr:330                   *     *       *     *      **      *      *       *       *   * **  *    *                           
adr:340                  *       *       *  *       * *      *      *        *        * * * * * * *                            
adr:350                 *         *       **      *   *             *         *                    *                           
adr:360                 *         *       *     *      *           *            *       ** ** *     *                          
adr:370                 *         *      *     ********************************************         *                          
adr:380                 *         *           *    *  *                    *  *            *        *                          
adr:390                 *         *           *    *  *                    *  *            *        *                          
adr:3a0                 *          * * * * * * ********************************************         *                          
adr:3b0                 *               ***** *                                                     *                          
adr:3c0                 *               ***** *                                                     *                          
adr:3d0                 *               ***** *                                                     *                          
adr:3e0                  *              ***** *                                                    *                           
adr:3f0                    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                             
/mnt/z/mame/roms/lemans/005837.n5	512	end
/mnt/z/mame/roms/lemans/005837.n5	1024
/mnt/z/mame/roms/lemans/005837.n5	1024	end
/mnt/z/mame/roms/lemans/005837.n5	1536
/mnt/z/mame/roms/lemans/005837.n5	1536	end
/mnt/z/mame/roms/lemans/005838.n4	0
adr:  0 *  **** *       * *     * *   * * *  *  **   *  ***  * *     ***  *  ***  *  * * *   * * **  * * **   ** **    **      
adr: 10**  ******  *** * ***** * **** ** ****  * * **  *  ***  *   * ** **** ** *****   ** **   * ***   * *** * * ****  *  *** 
adr: 20*   ****            * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                             
adr: 30                  *              * **  *                                  ***  *            *                           
adr: 40                 *               * **  *                                  ***  *             *                          
adr: 50                 *               * **  *                                  ***  *             *                          
adr: 60                 *               * **  *                                  ***  *             *                          
adr: 70                 *               * **  *                                  ***  *             *                          
adr: 80                 *               * * * * * * * * * * * * * * * * * * * * * * * *             *                          
adr: 90                 *              *                                               *            *                          
adr: a0                 *              *                                               *            *                          
adr: b0                 *              *                                               *            *                          
adr: c0                  *              *                                              *            *                          
adr: d0                   *              *                                             *            *                          
adr: e0                    *              *                                            *            *                          
adr: f0                     *              *********************************************            *                          
adr:100                      *             *       *  *            *  *                *            *                          
adr:110                      *  ****  *    *       *  *            *  *                *            *                          
adr:120                     *   ****  *    *********************************************            *                          
adr:130                    *    ****  *   *                                            *            *                          
adr:140                   *     ****  *  *                                            *   **  *    *                           
adr:150                  *      ****  * *                                            *    **  *   *                            
adr:160                 *              *                                            *     **  *  *                             
adr:170                 *              *                                           *      **  * *                              
adr:180                 *              *                                          *            *                               
adr:190                 *               * * * * * * * * * * * * * * * * * * * * *             *                                
adr:1a0                 *                                       ***** *                      *                                 
adr:1b0                 *                                       ***** *                     *                                  
adr:1c0                 *                                       ***** *                    *                                   
adr:1d0                 *                                       ***** *                   *                                    
adr:1e0                  *                                      ***** *                  *                                     
adr:1f0                    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                                       
/mnt/z/mame/roms/lemans/005838.n4	0	end
/mnt/z/mame/roms/lemans/005838.n4	512
adr:200 *  **** *       * *     * *   * * *  *  **   *  ***  * *     ***  *  ***  *  * * *   * * **  * * **   ** **    **      
adr:210**  ******  *** * ***** * **** ** ****  * * **  *  ***  *   * ** **** ** *****   ** **   * ***   * *** * * ****  *  *** 
adr:220*   ****                * * * * * * * *                               * * * * * * *                                     
adr:230                      *          * **  * *                         *      ***  *    *                                   
adr:240                    *            * **  *   *                     *        ***  *      *                                 
adr:250                  *              * **  *     *                 *          ***  *        *                               
adr:260                 *               * **  *       *             *            ***  *          *                             
adr:270                 *               * **  *         *          *             ***  *           *                            
adr:280                 *                *                *       *             * * * *            *                           
adr:290                  *                 *                *    *            *         *           *                          
adr:2a0                    *                 *                *  *           *           *          *                          
adr:2b0                      *                 *               **            *           *          *                          
adr:2c0                        *                 *                           *           *          *                          
adr:2d0                          *                **                         *           *          *                          
adr:2e0                           *               *  *                      *            *          *                          
adr:2f0                          *                *    *                   *             *          *                          
adr:300                        *                 *       *                *              *          *                          
adr:310                      *  ****  *        *           * * * * * *  *                *          *                          
adr:320                    *    ****  *      *                                           *          *                          
adr:330                  *      ****  *    **********************************************           *                          
adr:340                 *       ****  *  *         *  *            *  *                *           *                           
adr:350                 *       ****  **           *  *            *  *               *   **  *   *                            
adr:360                 *              ***********************************************    **  *  *                             
adr:370                 *              *                                            *           *                              
adr:380                 *              *                                           *           *                               
adr:390                 *                * * * * * * * * * * * * * * * * * * * * *            *                                
adr:3a0                 *                                       ***** *                      *                                 
adr:3b0                 *                                       ***** *                     *                                  
adr:3c0                 *                                       ***** *                    *                                   
adr:3d0                 *                                       ***** *                   *                                    
adr:3e0                  *                                      ***** *                  *                                     
adr:3f0                    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                                       
/mnt/z/mame/roms/lemans/005838.n4	512	end
/mnt/z/mame/roms/lemans/005838.n4	1024
adr:400 *  **** *       * *     * *   * * *  *  **   *  ***  * *     ***  *  ***  *  * * *   * * **  * * **   ** **    **      
adr:410**  ******  *** * ***** * **** ** ****  * * **  *  ***  *   * ** **** ** *****   ** **   * ***   * *** * * ****  *  *** 
adr:420*   ****            * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                             
adr:430                  *                              ** ** *  ***  *                            *                           
adr:440                 *                               ** ** *  ***  *                             *                          
adr:450                 *                               ** ** *  ***  *                             *                          
adr:460                 *                               ** ** *  ***  *                             *                          
adr:470                 *               *********************************************               *                          
adr:480                 *             *    *  *                    *  *       *       *             *                          
adr:490                 *             *    *  *                    *  *               *             *                          
adr:4a0                 *       * **  * *********************************************               *                          
adr:4b0                 *       * **  *                         *                 *                *                           
adr:4c0                  *      * **  *                           *             *                 *                            
adr:4d0                   *     * **  *                             *         *   **  *   **  * *                              
adr:4e0                     *   * **  *                               *      *                *                                
adr:4f0                       * * **  *                                 *   *                *                                 
adr:500                          * * * * * * * * * * * * *                * *                *                                 
adr:510                       *                            *                *                  *                               
adr:520                     *                                *                *                  *                             
adr:530                    *                            ****  **               **                  *                           
adr:540                   *                             ****  *  *             *  *                 *                          
adr:550                  *                              ****  *                *    *               *                          
adr:560                 *                * * * * * * *  ****  *               *      *              *                          
adr:570                 *              *               *                     *        *             *                          
adr:580                 *              *                 *                 *         *              *                          
adr:590                 *                * * * * * * * * * * * * * * * * * * * * * *                *                          
adr:5a0                 *                                       ***** *         ** ** *             *                          
adr:5b0                 *                                       ***** *         ** ** *            *                           
adr:5c0                 *                                       ***** *                           *                            
adr:5d0                 *                                       ***** *                 ** ** * *                              
adr:5e0                  *                                      ***** *                       *                                
adr:5f0                    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                                   
/mnt/z/mame/roms/lemans/005838.n4	1024	end
/mnt/z/mame/roms/lemans/005838.n4	1536
adr:600 *  **** *       * *     * *   * * *  *  **   *  ***  * *     ***  *  ***  *  * * *   * * **  * * **   ** **    **      
adr:610**  ******  *** * ***** * **** ** ****  * * **  *  ***  *   * ** **** ** *****   ** **   * ***   * *** * * ****  *  *** 
adr:620*   ****                 * * * * * * * * * * *               * * * * * * * * * * * * *                                  
adr:630                      *                         *         *                             *                               
adr:640                    *                             *     *                                 *                             
adr:650                  *                                 * *                                     *                           
adr:660                 *                                   *                                       *                          
adr:670                 *               * * *               *           * * * * * * * * *           *                          
adr:680                 *             *       *             *            ***  * *        *          *                          
adr:690                 *             *       *             *            ***  *   *      *          *                          
adr:6a0                 *             *       * ****  *     *            ***  *     *    *          *                          
adr:6b0                  *              *   *   ****  *    * *           ***  *       *  *          *                          
adr:6c0                   *     ** ** *   *     ****  *   *    * * * * *               * *          *                          
adr:6d0                    *    ** ** *         ****  * *                *              **          *                          
adr:6e0                      *  ** ** *               *                    *             *          *                          
adr:6f0                        *                    *                       *            *          *                          
adr:700                          *                *                          *           *          *                          
adr:710                        *                    *                        *           *          *                          
adr:720                      *                  * **  ** * * * * * * * * * *             *          *                          
adr:730                    *                    * **  *                                 *           *                          
adr:740                  *                *     * **  *                                *           *                           
adr:750                 *               *   *   * **  *                               *   **  *   *                            
adr:760                 *              *       *                ** ** *              *    **  *  *                             
adr:770                 *              **********************************************     **  * *                              
adr:780                 *              *           *  *            *  *            *           *                               
adr:790                 *               *          *  *            *  *          *            *                                
adr:7a0                 *                 **************************************             *                                 
adr:7b0                 *                               ***** *                             *                                  
adr:7c0                 *                               ***** *                            *                                   
adr:7d0                 *                               ***** *                           *                                    
adr:7e0                  *                              ***** *                          *                                     
adr:7f0                    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                                       
/mnt/z/mame/roms/lemans/005838.n4	1536	end
/mnt/z/mame/roms/lemans/005839.n6	0
adr:  0 *  **** *       * *     * *   * * *  *  **   *  ***  * *     ***  *  ***  *  * * *   * * **  * * **   ** **    **      
adr: 10**  ******  *** * ***** * **** ** ****  * * **  *  ***  *   * ** **** ** *****   ** **   * ***   * *** * * ****  *  *** 
adr: 20*   ****            * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                             
adr: 30                  *      ****  *                                                            *                           
adr: 40                 *       ****  *         ** ** *                                             *                          
adr: 50                 *       ****  *         ** ** *                                             *                          
adr: 60                 *       ****  *                                                             *                          
adr: 70                 *       ****  ***************************************************           *                          
adr: 80                 *            *     *  *           *         *      *  *          *          *                          
adr: 90                 *            *     *  *         *             *    *  *          *          *                          
adr: a0                 *            *******************               ******************           *                          
adr: b0                 *            *                *       **        *              *           *                           
adr: c0                 *            *              *        *  *        *            * * **  *   *                            
adr: d0                 *            * * * * * * *          *    *         * * * * * *  * **  * *                              
adr: e0                 *            *                    * * * * *                           *                                
adr: f0                 *            *                  *          *                        *                                  
adr:100                 *            *                * ** ** *     *                    * * * * *                             
adr:110                 *            *        * * * * *               * * * * * * * * *   **  *    *                           
adr:120                 *            *       *        *               *             *     **  *     *                          
adr:130                 *            *        *       *       *       *           *       **  *     *                          
adr:140                 *            *   ***  **      *       *       *         *         **  *     *                          
adr:150                 *            **  ***  * *     *       *       *       *           *         *                          
adr:160                 *            * *          * *         *         * * *           *  *        *                          
adr:170                 *            *  *                     *                       *    *        *                          
adr:180                 *            *   *                    *                     *     *         *                          
adr:190                 *            *     *                 * *                  *     *           *                          
adr:1a0                 *             * * * * * * * * * * * * * * * * * * * * * * * * *            *                           
adr:1b0                 *                       ***** *                                           *                            
adr:1c0                 *                       ***** *                                         *                              
adr:1d0                 *                       ***** *                                       *                                
adr:1e0                  *                      ***** *                                     *                                  
adr:1f0                    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                                     
/mnt/z/mame/roms/lemans/005839.n6	0	end
/mnt/z/mame/roms/lemans/005839.n6	512
adr:200 *  **** *       * *     * *   * * *  *  **   *  ***  * *     ***  *  ***  *  * * *   * * **  * * **   ** **    **      
adr:210**  ******  *** * ***** * **** ** ****  * * **  *  ***  *   * ** **** ** *****   ** **   * ***   * *** * * ****  *  *** 
adr:220*   ****            * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                             
adr:230                  *              ****  *        *          *                                *                           
adr:240                 *               ****  *         ** ** *      *                              *                          
adr:250                 *               ****  *          *     *                                    *                          
adr:260                 *               ****  *           *   *                                     *                          
adr:270                 *          * * * * * * * *         * *          * * * * * * * * * *         *                          
adr:280                 *         *      ***  *   *         *         *              *     *        *                          
adr:290                 *         *      ***  *    *        *       *                  *   *        *                          
adr:2a0                 **       **       *          *      *      *                    *  *        *                          
adr:2b0                 *         *        *          *           *                      * *        *                          
adr:2c0                 *         *         *           *         *          *           * *        *                          
adr:2d0                  *         *          *          *         *         *          *  *        *                          
adr:2e0                   *         *           *         *         *        *         *   *        *                          
adr:2f0                     *         *          *         *        *        *         *   *        *                          
adr:300                       * ** ** * *         *         *      *         *          *  *        *                          
adr:310                       * ** ** * *         * *         *  *          * *          **         *                          
adr:320                     *         *           *   *                    *   *        * **  *     *                          
adr:330                   *         *           *       *                *       *      * **  *    *                           
adr:340                  *         *          * * * * * * * * * * * * * * * * * * * * * * * * * * *                            
adr:350                 *         *         *                     **  * ** ** *                    *                           
adr:360                 *         *       *                       **  * ** ** *                     *                          
adr:370                 *         *      *     ********************************************         *                          
adr:380                 *         *           *    *  *                    *  *            *        *                          
adr:390                 *         *           *    *  *                    *  *            *        *                          
adr:3a0                 *          * * * * * * ********************************************         *                          
adr:3b0                 *               ***** *                                                     *                          
adr:3c0                 *               ***** *                                                     *                          
adr:3d0                 *               ***** *                                                     *                          
adr:3e0                  *              ***** *                                                    *                           
adr:3f0                    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                             
/mnt/z/mame/roms/lemans/005839.n6	512	end
/mnt/z/mame/roms/lemans/005839.n6	1024
adr:400 *  **** *       * *     * *   * * *  *  **   *  ***  * *     ***  *  ***  *  * * *   * * **  * * **   ** **    **      
adr:410**  ******  *** * ***** * **** ** ****  * * **  *  ***  *   * ** **** ** *****   ** **   * ***   * *** * * ****  *  *** 
adr:420*   ****            * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                                 
adr:430                  *              ****  *                                                *                               
adr:440                 *               ****  *                                                 *                              
adr:450                 *               ****  *                                                  *                             
adr:460                 *               ****  *                                                   *                            
adr:470                 *             * * * * * * * * * * * * * * * * * * * * * * * * * *          *                           
adr:480                 *           *                   * **  * ** ** *                   *         *                          
adr:490                 *           *           ** ** * * **  *                            *        *                          
adr:4a0                 *           *        * * * * * * * * * * * * * * * * * * * *        *       *                          
adr:4b0                 *           *       *                    ***  *              *              *                          
adr:4c0                 *           *       *                    ***  *              * *            *                          
adr:4d0                 *           **       *        * * * * * * * * * * *         * * *           *                          
adr:4e0                 *           * *       *      *  *                         *      *          *                          
adr:4f0                 *           *  *       *      **                        *         *        *                           
adr:500                 *           *   *      *      *      * * * * * * * * *    **  *    * * * *                             
adr:510                 *           *  *      *      *      *             *          **            *                           
adr:520                 *           * *      *      *      *           *          *    *            *                          
adr:530                 *           **      *      *      *         *          *         * *        *                          
adr:540                 *           *      *      *        * * * *          *               *       *                          
adr:550                 *           *     *      *                       *                  *       *                          
adr:560                 *           *           * *                   *                     *       *                          
adr:570                 *           *          **********************************************       *                          
adr:580                 *           *         *    *  *                    *  *     *       *       *                          
adr:590                 *           *         *    *  *                    *  *   *        *        *                          
adr:5a0                 *            * * * * * *******************************************         *                           
adr:5b0                 *                       ***** *                                           *                            
adr:5c0                 *                       ***** *                                         *                              
adr:5d0                 *                       ***** *                                       *                                
adr:5e0                  *                      ***** *                                     *                                  
adr:5f0                    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                                     
/mnt/z/mame/roms/lemans/005839.n6	1024	end
/mnt/z/mame/roms/lemans/005839.n6	1536
adr:600 *  **** *       * *     * *   * * *  *  **   *  ***  * *     ***  *  ***  *  * * *   * * **  * * **   ** **    **      
adr:610**  ******  *** * ***** * **** ** ****  * * **  *  ***  *   * ** **** ** *****   ** **   * ***   * *** * * ****  *  *** 
adr:620*   ****            * * * * * * * * * * * * * * * * * * * * * * * * * *           * * * * *                             
adr:630                  *                                      ****  *       *       *            *                           
adr:640                 *                                       ****  *        *    *               *                          
adr:650                 *        * * * * * * * * * * * * * * * * * * * *       *  *        *       *                           
adr:660                 *         *                 *                          **        *       *                             
adr:670                 *         *              *                            *        *       *                               
adr:680                  *       *            * ** ** *   * * * * * * * * * *        *       * * * *                           
adr:690                   *     *          *           *                ** ** *    *       *        *                          
adr:6a0                  *       *      *           *                            *       *          *                          
adr:6b0                 *         *  *           *         * * * * * * * * * * * *       ***  *     *                          
adr:6c0                 *         **          * * **  * *                         *          *      *                          
adr:6d0                  *       *         *         *                             *       * *      *                          
adr:6e0                   *     *        *        *         * * * * * * * * * *      * * *   *      *                          
adr:6f0                  *       *       *        *       *       *       **  * *     *      *      *                          
adr:700                 *         *       * *       *      *    *         **  *  *     *     *      *                          
adr:710                 *         *       *   *      *      *  *      * * *       *     * * *       *                          
adr:720                  *       *       *     *      *      **      *     *       *                *                          
adr:730                   *     *       *     *      **      *      *       *       *   ** ** *    *                           
adr:740                  *       *       *  *       * *      *      *        *        * * * * * * *                            
adr:750                 *         *       **      *   *             *         *                    *                           
adr:760                 *         *       *     *      *           *            *       ** ** *     *                          
adr:770                 *         *      *     ********************************************         *                          
adr:780                 *         *           *    *  *                    *  *            *        *                          
adr:790                 *         *           *    *  *                    *  *            *        *                          
adr:7a0                 *          * * * * * * ********************************************         *                          
adr:7b0                 *               ***** *                                                     *                          
adr:7c0                 *               ***** *                                                     *                          
adr:7d0                 *               ***** *                                                     *                          
adr:7e0                  *              ***** *                                                    *                           
adr:7f0                    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                             
/mnt/z/mame/roms/lemans/005839.n6	1536	end
/mnt/z/mame/roms/lemans/005837.n5	0
600        **         610
601 ***   ****   ***  611
602 ****************  612
603 ***   ****   ***  613
604       ****        614
605 ***   ****   ***  615
606 ****************  616
607 ***          ***  617
------
/mnt/z/mame/roms/lemans/005837.n5	1
620   **     *        630
621  ***    ***       631
622  **    ****   **  632
623        ***   ***  633
624 ***   ****   **   634
625 **   ****         635
626      ****   ***   636
627             **    637
------
/mnt/z/mame/roms/lemans/005837.n5	2
640    ***    ***     650
641   ***    ***      651
642         ****   *  652
643 ***    ****   **  653
644 **    ****   ***  654
645 *    ****         655
646            ***    656
647           ***     657
------
/mnt/z/mame/roms/lemans/005837.n5	3
660     **     **     670
661   ***    ***      671
662         ***       672
663 ***   ****    **  673
664 **   ****   ****  674
665     ****          675
666            **     676
667          ***      677
------
/mnt/z/mame/roms/lemans/005837.n5	4
680       ***         690
681     **      **    691
682          ****     692
683   **   *****      693
684 **   *****    **  694
685     ****    **    695
686          **       696
687        **         697
------
/mnt/z/mame/roms/lemans/005837.n5	5
6a0         **        6b0
6a1       ***     **  6b1
6a2   **      ****    6b2
6a3 ***    *****      6b3
6a4      *****    **  6b4
6a5     ****    ***   6b5
6a6          **       6b6
6a7        ***        6b7
------
/mnt/z/mame/roms/lemans/005837.n5	6
6c0      ******       6d0
6c1 ****              6d1
6c2 **         *****  6d2
6c3       ******      6d3
6c4     ******        6d4
6c5               **  6d5
6c6             ****  6d6
6c7      ******       6d7
------
/mnt/z/mame/roms/lemans/005837.n5	7
6e0 *****  *****      6f0
6e1 ****   ****       6f1
6e2   **     **       6f2
6e3   **************  6f3
6e4    **********     6f4
6e5     **     **     6f5
6e6     ****   ****   6f6
6e7    *****  ******  6f7

------
...etc from 16 to 31
------




Gran Trak 10 seems to have ta similar track format:


Code


function prtbyte(b) local i for i=7,0,-1 do if (b & (2^i)) ~= 0 then io.write("*") else io.write (" ") end end end
fnamestable = {"/mnt/z/mame/roms/gtrak10/gtrak10/074186.j5"} for fni,fn in pairs(fnamestable) do f = io.open(fn,"r") a = f:read("*a") for z = 0,0x7ff,0x200 do print(fn, z) for y=0,31 do for x=0,15 do adr = (x | (y<<4)) + z b = a:byte(1+adr) if x==0 then io.write("adr:"..string.format("%3x",adr)) end if x~=7 then prtbyte(b) end end print() end print(fn,z,"end") end end  for x = 0,31 do print(fnamestable[1],x) for y=0,7 do adr = (y | (((x & 0x10)>>4) << 3) | ((x & 0xf)<<5)) | (2^9) | (2^10) io.write(string.format("%2x",adr).." ") b = a:byte(1+adr) prtbyte(b) adr = adr | (2^4) b= a:byte(1+adr) prtbyte(b) print("  "..string.format("%2x",adr)) end print("------") end 
/mnt/z/mame/roms/gtrak10/gtrak10/074186.j5	0
adr:  0 *  **** *       * *     * *   * * *  *  **   *  ***  * *     ***  *  ***  *  * * *   * * **  * * **   ** **    **      
adr: 10**  ******  *** * ***** * **** ** ****  * * **  *  ***  *   * ** **** ** *****   ** **   * ***   * *** * * ****  *  *** 
adr: 20*   ****                                          * * * * * *                                                           
adr: 30                  ****************************  *             *  ****************************                           
adr: 40                 *          *  *              *                 *           *  *             *                          
adr: 50                 *          *  *             *                   *          *  *             *                          
adr: 60                  ***************************                     ***************************                           
adr: 70                     *                    * *          *          * *              **  *     *                          
adr: 80                   *                        *          *          *                **  *     *                          
adr: 90                  *                          *         *         *          * * * *          *                          
adr: a0                 *          * * * *           *        *  ***  **         *        *         *                          
adr: b0                 *         *     *           *         *       *         *         *         *                          
adr: c0                 *         *   * ****  *    *         **       **         *        *         *                          
adr: d0                 *         *  *  ****  *  *          * *       *  *          *     *         *                          
adr: e0                 *         * *   ****  **           * *        *    *           *  *         *                          
adr: f0                 *         **          *           *  *          * * * *          **         *                          
adr:100                 *         *          *          *     *                          **         *                          
adr:110                 *         *         *          *        *                       * *         *                          
adr:120                 *         *         *           * * * * * * * * * * * * * * * *   *         *                          
adr:130                 *         *         *                   * **  *                 * *         *                          
adr:140                 *         *          *                  * **  *                   *         *                          
adr:150                 *         **          *                 * **  *                   *         *                          
adr:160           *     *         * *           * * * * * * * * * * * * * * * * *         *         *                          
adr:170                 *         *  *                     ** *                           *         *                          
adr:180                 *         *   *                    ** *                           *         *                          
adr:190                 *         *     *                  ** *                          *          *                          
adr:1a0                 *          * * * * * * * * * * * * * * * * * * * * * * * * * * *            *                          
adr:1b0                 *               ***** *                                                     *                          
adr:1c0                 *               ***** *                                                     *                          
adr:1d0                 *               ***** *                                                     *                          
adr:1e0                  *              ***** *                                                    *                           
adr:1f0                    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                             
/mnt/z/mame/roms/gtrak10/gtrak10/074186.j5	0	end
/mnt/z/mame/roms/gtrak10/gtrak10/074186.j5	512
adr:200 *  **** *       * *     * *   * * *  *  **   *  ***  * *     ***  *  ***  *  * * *   * * **  * * **   ** **    **      
adr:210**  ******  *** * ***** * **** ** ****  * * **  *  ***  *   * ** **** ** *****   ** **   * ***   * *** * * ****  *  *** 
adr:220*   ****            * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *                             
adr:230                  *                 ** * * **  *    ** *                                    *                           
adr:240                 *                  ** * * **  *    ** *                                     *                          
adr:250                 *                  ** * * **  *    ** *                                     *                          
adr:260                 *                  ** * * **  *    ** *                                     *                          
adr:270                 *      ******************* * * * * * * * * * * *******************          *                          
adr:280                 *     *    *  *           *                   *    *  *           *         *                          
adr:290                 *     *    *  *           *                   *    *  *  *        *         *                          
adr:2a0                 *     *********************        * *         ********************         *                          
adr:2b0                 *     *       *            *      **  **                      *   *         *                          
adr:2c0                 *     *      *               *    **  *  *                      * *         *                          
adr:2d0                 *      *    *                  *           * * * * * *           **         *                          
adr:2e0                 *       * *          * *         *                     *          *         *                          
adr:2f0                 **                  *    *         *                    *         *         *                          
adr:300 *               *  *               *       *         * * * * * *        *         *         *                          
adr:310                 *    * * * * * * *           *  ****  **       *        *         *         *                          
adr:320                 *  *       ** *    *           *         *    *        *         **         *                          
adr:330                 **                   *           *         * *        *         * *         *                          
adr:340                 *                     *            *        **       *         *  *         *                          
adr:350                 *          * *         *             *       *      *         *   *         *                          
adr:360           *     *        *     *         *            *       *     *         *   *         *                          
adr:370                 *       *       *          * * * * * *         *     *         *  *         *                          
adr:380                 *       *        *                             *      *         * *         *                          
adr:390                 *        *         *                           *       *         **         *                          
adr:3a0                 *          * * * * * * * * * * * * * * * * * *          *         *         *                          
adr:3b0                 *               ***** *                                 *        ***  *     *                          
adr:3c0                 *               ***** *                                 *        ***  *     *                          
adr:3d0                 *               ***** *                                 *        ***  *     *                          
adr:3e0                  *              ***** *                                * *       ***  *    *                           
adr:3f0                    * * * * * * * * * * * * * * * * * * * * * * * * * *     * * * * * * * *                             
/mnt/z/mame/roms/gtrak10/gtrak10/074186.j5	512	end
/mnt/z/mame/roms/gtrak10/gtrak10/074186.j5	1024

/mnt/z/mame/roms/gtrak10/gtrak10/074186.j5	1024	end
/mnt/z/mame/roms/gtrak10/gtrak10/074186.j5	1536

/mnt/z/mame/roms/gtrak10/gtrak10/074186.j5	1536	end
/mnt/z/mame/roms/gtrak10/gtrak10/074186.j5	0
600        **         610
601 ***   ****   ***  611
602 ****************  612
603 ***   ****   ***  613
604       ****        614
605 ***   ****   ***  615
606 ****************  616
607 ***          ***  617
------
------
etc
------

And the score data:

It has the score data that goes from 0 to 78 by twos.

Code
function prtbyte(b) local i for i=7,0,-1 do if (b & (2^i)) ~= 0 then io.write("*") else io.write (" ") end end end
for i=0,#a-1,4 do io.write(string.format("%2x",(i))..":"..string.format("%2x",a:byte(i+1)).." ") prtbyte(a:byte(i+1)) print() end


400: 0         
404: 7      ***
408: 5      * *
40c: 5      * *
410: 5      * *
414: 5      * *
418: 5      * *
41c: 7      ***
420: 0         
424: 7      ***
428: 5      * *
42c: 5      * *
430: 7      ***
434: 5      * *
438: 5      * *
43c: 7      ***
440: 0         
444:27   *  ***
448:25   *  * *
44c:25   *  * *
450:25   *  * *
454:25   *  * *
458:25   *  * *
45c:27   *  ***
460: 0         
464:27   *  ***
468:25   *  * *
46c:25   *  * *
470:27   *  ***
474:25   *  * *
478:25   *  * *
47c:27   *  ***
480: 0         
484:e7 ***  ***
488:25   *  * *
48c:25   *  * *
490:e5 ***  * *
494:85 *    * *
498:85 *    * *
49c:e7 ***  ***
4a0: 0         
4a4:e7 ***  ***
4a8:25   *  * *
4ac:25   *  * *
4b0:e7 ***  ***
4b4:85 *    * *
4b8:85 *    * *
4bc:e7 ***  ***
4c0: 0         
4c4:e7 ***  ***
4c8:25   *  * *
4cc:25   *  * *
4d0:e5 ***  * *
4d4:25   *  * *
4d8:25   *  * *
4dc:e7 ***  ***
4e0: 0         
4e4:e7 ***  ***
4e8:25   *  * *
4ec:25   *  * *
4f0:e7 ***  ***
4f4:25   *  * *
4f8:25   *  * *
4fc:e7 ***  ***
500: 0         
504:a7 * *  ***
508:a5 * *  * *
50c:a5 * *  * *
510:e5 ***  * *
514:25   *  * *
518:25   *  * *
51c:27   *  ***
520: 0         
524:a7 * *  ***
528:a5 * *  * *
52c:a5 * *  * *
530:e7 ***  ***
534:25   *  * *
538:25   *  * *
53c:27   *  ***
540: 0         
544:e7 ***  ***
548:85 *    * *
54c:85 *    * *
550:e5 ***  * *
554:25   *  * *
558:25   *  * *
55c:e7 ***  ***
560: 0         
564:e7 ***  ***
568:85 *    * *
56c:85 *    * *
570:e7 ***  ***
574:25   *  * *
578:25   *  * *
57c:e7 ***  ***
580: 0         
584:87 *    ***
588:85 *    * *
58c:85 *    * *
590:e5 ***  * *
594:a5 * *  * *
598:a5 * *  * *
59c:e7 ***  ***
5a0: 0         
5a4:87 *    ***
5a8:85 *    * *
5ac:85 *    * *
5b0:e7 ***  ***
5b4:a5 * *  * *
5b8:a5 * *  * *
5bc:e7 ***  ***
5c0: 0         
5c4:e7 ***  ***
5c8:25   *  * *
5cc:25   *  * *
5d0:25   *  * *
5d4:25   *  * *
5d8:25   *  * *
5dc:27   *  ***
5e0: 0         
5e4:e7 ***  ***
5e8:25   *  * *
5ec:25   *  * *
5f0:27   *  ***
5f4:25   *  * *
5f8:25   *  * *
5fc:27   *  ***


> for i=1,#a-1,4 do io.write(string.format("%2x",(i))..":"..string.format("%2x",a:byte(i+1)).." ") prtbyte(a:byte(i+1)) print() end

Displays the digits that end in 2

401: 0         
405: 7      ***
409: 1        *
40d: 1        *
411: 7      ***
415: 4      *  
419: 4      *  
41d: 7      ***
421:70  ***    
425:c7 **   ***
429:70  ***    
42d:c7 **   ***
431:e0 ***     
435:80 *       
439:e0 ***     
43d:86 *    ** 
441: 0         
445:27   *  ***
449:21   *    *
44d:21   *    *
451:27   *  ***
455:24   *  *  
459:24   *  *  
45d:27   *  ***
461:38   ***   
465: f     ****
469:18    **   
46d: 7      ***
471:70  ***    
475: 0         
479: 0         
47d: 0         
481: 0         
485:e7 ***  ***
489:21   *    *
48d:21   *    *
491:e7 ***  ***
495:84 *    *  
499:84 *    *  
49d:e7 ***  ***
etc
Liked Replies
#121077 Jun 29th a 03:16 PM
by Golden Child
Golden Child
Ok, modifying nld_dm9314.cpp to do some RS action:
Code
		NETLIB_HANDLERI(inputs)
		{
			netlist_time delay = NLTIME_FROM_NS(24); //FIXME!
			if (!m_MRQ())
			{
				/* Reset! */
				for (std::size_t i=0; i<4; i++)
					m_Q[i].push(0, delay);
			} else {
				for (std::size_t i=0; i<4; i++)
				{
					if (m_SQ[i]())
					{
						/* R-S Mode */
						// FIXME: R-S mode is not yet implemented!
						
						// RS mode is just an "extension of regular D mode"

						// way RS mode works is that D and S bar should be high (keeps old value)
						// S bar going low sets output high
						// Data going low and S bar high sets output low
						// S bar going low AND D going low sets output low (D takes precedence)

						if (!m_EQ())
						if (!m_D[i]())  // if D low and SQ high we clear the bit
						{
							m_last_Q &= ~(1 << i);
							m_Q[i].push((m_last_Q & (1<<i))>>i, delay);
						}
					}
					else  // SQ is Low
					{
						/* D Mode */
						if (!m_EQ())
						{
							m_Q[i].push(m_D[i](), delay);
							m_last_Q &= ~(1 << i);
							m_last_Q |= (m_D[i]() << i);
						}
					}
				}
			}
		}

And also realizing that I swapped the D and S parameters when I use the 9314, (really easy to do... 8-)

now I can do a full lap with the checkpoint scoring working!

Yes!

4 members like this
#121032 Jun 16th a 07:45 AM
by Golden Child
Golden Child
There's a couple more interesting pages on Ed Fries' site:

https://edfries.wordpress.com/2017/10/23/finding-the-first-videogame-rom/

https://edfries.wordpress.com/2017/03/22/chasing-the-first-arcade-easter-egg/


According to a forum post in 2013 by Stiletto at https://forums.arcade-museum.com/threads/old-rom-chips-need-replacing.177683/ ,
the rom in the Gran Trak 10 is a Mostek MK28000 PROM:

Quote
In case this comes up AGAIN, here is the preliminary datasheet for the Atari Le Mans PROM.

It's been identified through past Internet research as a Mostek MK28000 PROM (the same as in Tank / Tank II.)
313K mk28000p.pdf - http://www.sendspace.com/file/36nkqm

Also here are the databooks which contain it.
http://bitsavers.trailing-edge.com/pdf/mostek/_dataBooks/1977_Mostek_Memory_Products.pdf - 06-Aug-2013 14:47 17M
http://bitsavers.trailing-edge.com/...stek_Memory_Data_Book_and_Designers_Guide.pdf - 06-Aug-2013 18:07 38M

(these links are dead but it's there at bitsavers under Components)
http://bitsavers.trailing-edge.com/components/mostek/_dataBooks/

=================

Sometimes you can't figure out how things work unless you build a model. I couldn't quite see how the horizontal counter system worked in Lemans.

The manual lays it out, but that seems confusing.

[Linked Image from i.imgur.com]

So let's take the schematic and make a logisim model:

[Linked Image from i.imgur.com]

[Linked Image from i.imgur.com]

and what you see is that 512H isn't actually 512H but represents more of the "right half of the screen" since it gets set after the 0x1c2 clock and the counter gets reset but leaving the 512H bit making 0x200.
(In other words, the counter jumps from 0x1c2 to 0x200).
Once it hits 0x3c2 then it gets reset again back to 0x000, and then does HSYNC for 32 clocks.

This explains why the 7th row byte disappears in the racetrack. 512/64 = 8 for 8 bytes, but 0x1c2 / 64 = 7.03 so it jumps from 0x1c2 to 0x200 which skips that seventh byte.
2 members like this
#121066 Jun 26th a 08:19 PM
by Golden Child
Golden Child
After making some more analog outputs so I could see what's happening with gran trak 10:



Code
NETLIST_ANALOG_OUTPUT(config, "maincpu:data0", 0).set_params("DATA0", "bmp", FUNC(bitmap_printer_device::update_data0));
NETLIST_ANALOG_OUTPUT(config, "maincpu:data1", 0).set_params("DATA1", "bmp", FUNC(bitmap_printer_device::update_data1));
NETLIST_ANALOG_OUTPUT(config, "maincpu:data2", 0).set_params("DATA2", "bmp", FUNC(bitmap_printer_device::update_data2));
NETLIST_ANALOG_OUTPUT(config, "maincpu:data3", 0).set_params("DATA3", "bmp", FUNC(bitmap_printer_device::update_data3));
NETLIST_ANALOG_OUTPUT(config, "maincpu:data4", 0).set_params("DATA4", "bmp", FUNC(bitmap_printer_device::update_data4));
NETLIST_ANALOG_OUTPUT(config, "maincpu:data5", 0).set_params("DATA5", "bmp", FUNC(bitmap_printer_device::update_data5));
NETLIST_ANALOG_OUTPUT(config, "maincpu:data6", 0).set_params("DATA6", "bmp", FUNC(bitmap_printer_device::update_data6));
NETLIST_ANALOG_OUTPUT(config, "maincpu:data7", 0).set_params("DATA7", "bmp", FUNC(bitmap_printer_device::update_data7));

#define DEBUGNLAO(x,y) NETLIST_ANALOG_OUTPUT(config, "maincpu:"#x, 0).set_params(#y, "bmp", FUNC(bitmap_printer_device::update_##x));

DEBUGNLAO(a0,A0)
...
and then a corresponding printing routine:

Code
#define DEBUGITEM(x) NETDEV_ANALOG_CALLBACK_MEMBER(update_##x) {printf("UPDATE " #x ": %f  "#x"= %f\n",time.as_double(),data); }

DEBUGITEM(data0)
DEBUGITEM(data1)
DEBUGITEM(data2)
DEBUGITEM(data3)
DEBUGITEM(data4)
DEBUGITEM(data5)
DEBUGITEM(data6)
DEBUGITEM(data7)
DEBUGITEM(a0)
...

I could see that nld_tms4800 rom wasn't outputting any data,
so after fixing that

Code
			else
			{
//				unsigned d = 0x00;   // doesn't actually output any data setting d to zero
				unsigned d = m_last_data;
				for (std::size_t i=0; i<4; i++)
				{
					if (m_OE1())
						m_D[i].push((d >> i) & 1, delay);
					if (m_OE2())
						m_D[i+4].push((d >> (i+4)) & 1, delay);
				}
			}
		}

[Linked Image from i.imgur.com]

It looks a little bit recognizable. I'm really confused by fixfreq.cpp and how it handles the sync so I see about one frame of screen then nothing.
2 members like this
#121017 Jun 14th a 01:11 PM
by Golden Child
Golden Child
So how does the track data work exactly?

There's special byte patterns that get interpreted as a finish line, a slick, a checkpoint and a score/time display.

We can see this better if we rewrite the prtbyte function to label the bits on the printout and to show byte boundaries:

Code
function prtbyte(b) local i for i=7,0,-1 do if (b & (2^i)) ~= 0 then io.write(i) else io.write (" ") end end io.write("|") end

fnamestable = {"/mnt/z/mame/roms/lemans/005837.n5","/mnt/z/mame/roms/lemans/005838.n4","/mnt/z/mame/roms/lemans/005839.n6"} for fni,fn in pairs(fnamestable) do f = io.open(fn,"r") a = f:read("*a") for z = 0,0x7ff,0x200 do print(fn, z) for y=0,31 do for x=0,15 do adr = (x | (y<<4)) + z b = a:byte(1+adr) if x==0 then io.write("adr:"..string.format("%3x",adr)) end if x~=7 then prtbyte(b) end end print() end print(fn,z,"end") end end  fn = "/mnt/z/mame/roms/lemans/005837.n5" f = io.open(fn,"r") a = f:read("*a")  for x = 0,31 do print(fn,x) for y=0,7 do adr = (y | (((x & 0x10)>>4) << 3) | ((x & 0xf)<<5)) | (2^9) | (2^10) io.write(string.format("%2x",adr).." ") b = a:byte(1+adr) prtbyte(b) adr = adr | (2^4) b= a:byte(1+adr) prtbyte(b) print("  "..string.format("%2x",adr)) end print("------") end




/mnt/z/mame/roms/lemans/005837.n5	0
adr:  0 6  3210| 6      | 6 4    | 6 4   0| 6 4  1 | 65   1 | 654  1 |7     10|7  4  10|7  4  1 |7 5   1 |7 54  1 |7 54   0|7 54    |76      |
adr: 1076  3210|76  321 |7 54321 |7 5432 0|7 5432  |7 5 32  |7  432  |7   3 10| 6543 10| 65432  | 65 32  | 6 432  | 6 432 0| 6 4321 | 6  321 |
adr: 207   3210|        |    3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5     |        |        |        |        |        |
adr: 30        |        |  5     |        |        | 6543  0|        |        |        |    3   |        |        |        |        |        |
adr: 40        |        | 6      |        | 65 32 0| 6543  0|        |        |        |      1 |        |        |        |        |        |
adr: 50        |        | 6      |        |        | 6543  0|        |        | 65 32 0|        |7       |        |        |        |        |
adr: 60        |        | 6      |        |        | 6543  0| 65 32 0|        |        |        |  5     |        |        |        |        |
adr: 70        |        | 6      |    3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7       |    3   |        |        |        |        |
adr: 80        |        | 6      |   4    |  543  0|        |   4   0|        |        |  5     |      1 |        |        |        |        |
adr: 90        |        | 6      |   4    |  543  0|        |    3 1 |        |        |    3   |        |7       |        |        |        |
adr: a0        |        | 6      |   4    |   4 2 0| 6 4 2  |     2  |     2 0| 6 4    |      1 |        |  5     |        |        |        |
adr: b0        |        | 6      |   4    |        |       0|        |   4    |     2  |        |7       |    3   |        |        |        |
adr: c0        |        | 6      |   4    |        |        |7       |   4    |       0|        | 65     |     2  |        |        |        |
adr: d0        |        |  5     |    3 1 |7 5 3 1 |7       |  5     |   4    |        |7       | 6  3   |     2  |        |        |        |
adr: e0        |        |   4    |     2  |  5     |  5     |    3 1 |7 5     | 6      |7       | 6   2  |     2  |        |        |        |
adr: f0        |        |     2  |       0| 6      |    3   |        |        | 6      |7       | 65  2  |     2  |        |        |        |
adr:100        |        |       0| 65 32 0| 6      |      1 |        |        |7       |7       | 6   2  |     2  |        |        |        |
adr:110        |        |       0| 65 32 0| 6      |7       |7 5 3 1 |7 5 3 1 |       0| 6      |  5 3   |     2  |        |        |        |
adr:120        |        |     2  |       0|       0|  5     |        |        |      1 |  5     | 6 43  0|     2  |        |        |        |
adr:130        |        |   4    |     2  |      1 |    3   |        |        |    3   |    3   | 6 43  0|    3   |        |        |        |
adr:140        |        |  5     |    3   |     2 0| 6 4 2 0| 6 4 2 0| 6 4 2 0| 6 4 2 0| 6 4 2 0| 6 4 2 0| 6 4    |        |        |        |
adr:150        |        | 6      |   4    |   4    |        |        |   43  0| 65 32 0|        |        |    3   |        |        |        |
adr:160        |        | 6      |   4    |  5     |        |        |   43  0| 65 32 0|        |        |     2  |        |        |        |
adr:170        |        | 6      |   4    |  5     |76543210|76543210|76543210|76543210|76543210|7654    |     2  |        |        |        |
adr:180        |        | 6      |   4    |       0|    3  0|        |        |    3  0|        |    3   |     2  |        |        |        |
adr:190        |        | 6      |   4    |       0|    3  0|        |        |    3  0|        |    3   |     2  |        |        |        |
adr:1a0        |        | 6      |    3 1 |7 5 3 1 |76543210|76543210|76543210|76543210|76543210|7654    |     2  |        |        |        |
adr:1b0        |        | 6      |        | 65432 0|        |        |        |        |        |        |     2  |        |        |        |
adr:1c0        |        | 6      |        | 65432 0|        |        |        |        |        |        |     2  |        |        |        |
adr:1d0        |        | 6      |        | 65432 0|        |        |        |        |        |        |     2  |        |        |        |
adr:1e0        |        |  5     |        | 65432 0|        |        |        |        |        |        |    3   |        |        |        |
adr:1f0        |        |    3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5     |        |        |        |
/mnt/z/mame/roms/lemans/005837.n5	0	end
[Linked Image from i.imgur.com]



So all data coming from the roms is inverted.
And different bit patterns will do different items:
Code
65 32 0 is a slick       pattern 01 (24)  not 2 4 reversed = not 4 2
65432 0 is finish line   pattern 00 (24)  not 2 not 4 reversed = 4 2
6543  0 is checkpoint   65 is checkpoint 1
6 43  0 is checkpoint   6  is checkpoint 2
 543  0 is checkpoint    5 is checkpoint 3
  43  0 is checkpoint      is checkpoint 4

checkpoint is pattern 10 (24) 2 not 4 reversed = 4 not 2 and 65 determine checkpoint number

   3  0 is score   pattern 11 (24) 2 4  reversed is not 4 not 2

=========================

0 3 not 1 is special data  (that is one of the finish,slick,checkpoint or score)

Bits 0 1 and 3 determine special data:

[Linked Image from i.imgur.com]

bits 2 and 4 get put into a 9321 decoder to determine the special item to display

bits 5 and 6 determine the checkpoint number

[Linked Image from i.imgur.com]
1 member likes this
#121041 Jun 20th a 06:43 AM
by Golden Child
Golden Child
After building a circuit for the 9314, it makes it easy to see how the checkpoint system works.

Each point has to be hit in sequence and hitting the finish line resets it.

[Linked Image from i.imgur.com]
[Linked Image from i.imgur.com]
[Linked Image from i.imgur.com]
1 member likes this
#121040 Jun 20th a 12:02 AM
by Golden Child
Golden Child
One of the things that was puzzling me was how the reset car position worked, why does it show up in the center of the track about line 0x1B0?

I looked at this and looked at it, and couldn't figure out how it gets put there.

If you look at a track, it shows up at offset 0x1b0 (since this track starts at 0x600, it is on the line 0x7b0) in the middle.
Code
/mnt/z/mame/roms/lemans/005839.n6	1536
adr:600 6  3210| 6      | 6 4    | 6 4   0| 6 4  1 | 65   1 | 654  1 |7     10|7  4  10|7  4  1 |7 5   1 |7 54  1 |7 54   0|7 54    |76      |
adr:61076  3210|76  321 |7 54321 |7 5432 0|7 5432  |7 5 32  |7  432  |7   3 10| 6543 10| 65432  | 65 32  | 6 432  | 6 432 0| 6 4321 | 6  321 |
adr:6207   3210|        |    3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |        |  5 3 1 |7 5     |        |        |        |
adr:630        |        |  5     |        |        |        |        | 6543  0|       0|       0|        |    3   |        |        |        |
adr:640        |        | 6      |        |        |        |        | 6543  0|        |7    2  |        |     2  |        |        |        |
adr:650        |        | 6      |  5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7       |7  4    |    3   |    3   |        |        |        |
adr:660        |        | 6      |   4    |        |     2  |        |        |        |76      |  5     |  5     |        |        |        |
adr:670        |        | 6      |   4    |        |  5     |        |        |       0|        |7       |7       |        |        |        |
adr:680        |        |  5     |  5     |       0| 65 32 0|   4 2 0| 6 4 2 0| 6 4 2  |      1 |      1 |7 5 3   |        |        |        |
adr:690        |        |   4    | 6      |    3   |        |7       |        | 65 32 0|    3   |    3   |     2  |        |        |        |
adr:6a0        |        |  5     |  5     | 6      |     2  |        |        |        |  5     |  5     |     2  |        |        |        |
adr:6b0        |        | 6      |   4  1 |        |  5     |    3 1 |7 5 3 1 |7 5 3 1 |7 5     |  543  0|     2  |        |        |        |
adr:6c0        |        | 6      |   43   |       0| 6 43  0| 6      |        |        |   4    |      1 |     2  |        |        |        |
adr:6d0        |        |  5     |  5     |    3   |      1 |        |        |        |    3   |    3 1 |     2  |        |        |        |
adr:6e0        |        |   4    | 6      |  5     |   4    |     2 0| 6 4 2 0| 6 4 2 0|      1 |7 5   1 |     2  |        |        |        |
adr:6f0        |        |  5     |  5     |  5     |   4    |   4    |   4    |   43  0| 6     0|      1 |     2  |        |        |        |
adr:700        |        | 6      |   4    |   4 2  |     2  |    3   | 6      |   43  0|  5     |7     1 |     2  |        |        |        |
adr:710        |        | 6      |   4    |   4   0|      1 |     2  |7      0| 6 4    |   4    | 6 4 2  |     2  |        |        |        |
adr:720        |        |  5     |  5     |  5     |7      0|      10|      1 |    3   |    3   |        |     2  |        |        |        |
adr:730        |        |   4    | 6      | 6     0|      10|      1 |     2  |     2  |     2  | 65 32 0|    3   |        |        |        |
adr:740        |        |  5     |  5     |  5  2  |     2 0|      1 |     2  |      1 |       0| 6 4 2 0| 6 4    |        |        |        |
adr:750        |        | 6      |   4    |   43   |   4   0|        |     2  |       0|        |        |    3   |        |        |        |
adr:760        |        | 6      |   4    |   4    | 6      |7       |    3   |        | 6      | 65 32 0|     2  |        |        |        |
adr:770        |        | 6      |   4    |  5     |76543210|76543210|76543210|76543210|76543210|7654    |     2  |        |        |        |
adr:780        |        | 6      |   4    |       0|    3  0|        |        |    3  0|        |    3   |     2  |        |        |        |
adr:790        |        | 6      |   4    |       0|    3  0|        |        |    3  0|        |    3   |     2  |        |        |        |
adr:7a0        |        | 6      |    3 1 |7 5 3 1 |76543210|76543210|76543210|76543210|76543210|7654    |     2  |        |        |        |
adr:7b0        |        | 6      |        | 65432 0|        |        |STARTPOS|        |        |        |     2  |        |        |        |
adr:7c0        |        | 6      |        | 65432 0|        |        |        |        |        |        |     2  |        |        |        |
adr:7d0        |        | 6      |        | 65432 0|        |        |        |        |        |        |     2  |        |        |        |
adr:7e0        |        |  5     |        | 65432 0|        |        |        |        |        |        |    3   |        |        |        |
adr:7f0        |        |    3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5     |        |        |        |


Well, the vertical position counter is 12 bits (0-4096) and if we reset it to zero at the start of the frame, where will the car end up?

The screen is 521 lines so let's divide 4096 by 521.

so we divide it and we get 7.86 frames

> (4096 / 521)
7.8618042226488

multiply 7 * 521 = 3647

and subtract 4096 - 3647 = 449 which is 0x1c1 which is really close to 0x1b0. Maybe it's slightly different because of when the vertical blank hits.


===============================




[Linked Image from i.imgur.com]


Also I was trying to figure out how the 9314 worked (used to do checkpoints and scoring) and recreate it in Logisim, but it's got this weird symbol that looks like an AND gate but the inputs come into the side.

What does this mean?

edit: after a bunch of searching around, it's a wired and.

[Linked Image from i.imgur.com]
1 member likes this
#121075 Jun 28th a 11:21 PM
by Golden Child
Golden Child
Ok, I'm able to move the car a little. I say a little because it's hard to move it since you're clocking a flip flop. It expects to get pulses. But it will move 8-)

Since the horizontal counter seemed to be two off, I changed the main horizontal counter to use the 1H instead of 2H when it computes the end of the line and it seems to work ok. (The first time I tried it it didn't work, then I remembered that I should change the horizontal counter load back to 8 instead of 6 to match).




I hacked a 74193 counter to drive the 1D1 .. 1D4 and 1R0..1R3 outputs and I can turn the car.

Code

	TTL_74193(TEST_ROT, P,  P, P,  P,      GROUND, P, P1_LEFT_RIGHT.2, P1_LEFT_LEFT.2)

	SWITCH(P1_LEFT_LEFT)
	SWITCH(P1_LEFT_RIGHT)

	NET_C(P1_LEFT_LEFT_GND.1, GND)
	NET_C(P1_LEFT_RIGHT_GND.1, GND)

	NET_C(P1_LEFT_LEFT.1, P1_LEFT_LEFT_GND.2)
	NET_C(P1_LEFT_RIGHT.1, P1_LEFT_RIGHT_GND.2)
	
	NET_C(P1_LEFT_LEFT.2, P1_LEFT_LEFT_PULLUP.2)
	NET_C(P1_LEFT_RIGHT.2, P1_LEFT_RIGHT_PULLUP.2)

	RES(P1_LEFT_LEFT_PULLUP, RES_R(1000))
	RES(P1_LEFT_RIGHT_PULLUP, RES_R(1000))

	RES(P1_LEFT_LEFT_GND, RES_R(100))
	RES(P1_LEFT_RIGHT_GND, RES_R(100))

	NET_C(P1_LEFT_LEFT_PULLUP.1, VCC)
	NET_C(P1_LEFT_RIGHT_PULLUP.1, VCC)

	ALIAS(1R0, TEST_ROT.QA)
	ALIAS(1R1, TEST_ROT.QB)
	ALIAS(1R2, TEST_ROT.QC)
	ALIAS(1R3, TEST_ROT.QD)


	ALIAS(1D1, TEST_ROT.QA)
	ALIAS(1D2, TEST_ROT.QB)
	ALIAS(1D3, TEST_ROT.QC)
	ALIAS(1D4, TEST_ROT.QD)

	ALIAS(SPEED_PULSE, P1_LEFT_UP.2)

	NET_C(P1_LEFT_UP.1, SWITCH_R.2)
	NET_C(SWITCH_R.1, VCC)
	
	RES(SWITCH_R, RES_R(100))
	SWITCH(P1_LEFT_UP)

	RES(SWITCH_R_GND, RES_R(1000))
	NET_C(SWITCH_R_GND.1, GND)
	NET_C(P1_LEFT_UP.2, SWITCH_R_GND.2)





Since it's so hard to keep pressing keys, I clocked it with 512V to create pulses

Code
	TTL_74193(TEST_ROT, P,  P, P,  P,      GROUND, P, RIGHT_PULSES.Q, LEFT_PULSES.Q)

	TTL_7400_NAND(LEFT_PULSES, P1_LEFT_LEFT_HIGH.Q, 512V)
	TTL_7400_NAND(RIGHT_PULSES, P1_LEFT_RIGHT_HIGH.Q, 512V)

	TTL_7404_INVERT(P1_LEFT_LEFT_HIGH, P1_LEFT_LEFT.2)
	TTL_7404_INVERT(P1_LEFT_RIGHT_HIGH, P1_LEFT_RIGHT.2)


	ALIAS(SPEED_PULSE, SPEED_PULSES.Q) 

	TTL_7408_AND(SPEED_PULSES, P1_LEFT_UP.2, 512V)

1 member likes this
#121090 Jul 2nd a 11:58 AM
by Golden Child
Golden Child
So I looked at the schematic over and over again, trying different things and I've come to the conclusion that the RESET1 D-Latch must depend on the horizontal position somehow, either through HBLANK or 512H.

RESET1 pulse ends when it clocks in a P on the data line. If this happens when 512H goes high, the car will appear in the middle of the screen.


Code
	TTL_7408_AND(Reset1Clock, VLd1_Q, 512H)  // clock the reset1 flipflop depending on 512H
	
	TTL_7474(A4_A, Reset1Clock.Q, P, A6_B.Q, P)
//	TTL_7474(A4_A, VLd1_Q, P, A6_B.Q, P)  // according to schematic
	ALIAS(RESET1_Q, A4_A.Q)
	ALIAS(RESET1,   A4_A.QQ)

	TTL_7400_NAND(A2_B, CAR1VIDEO, COMP_SYNC_Q)
	TTL_7408_AND(A6_B, START_Q, A2_B.Q)


If you think about it awhile (it just came to me), no additional gating necessary.

You can set the flipflop with PRESET_Q so just connecting 512H_Q up will set it and shut off the RESET1.


Code
	TTL_7474(A4_A, VLd1_Q, P, A6_B.Q, 512H_Q)




It's actually kind of interesting to study these early Atari arcade games like Lemans/Gran Trak 10 and Tank because you see the similarities between them and what came later in the 2600. The horizontal and vertical position and motion based on counters, here discrete logic does the counting for vertical and horizontal, whereas the 2600 had the cpu do the vertical counting, and the horizontal counting was done with a polynomial counter with an cpu supplied HMOVE offset.
1 member likes this
#121111 Jul 4th a 03:00 PM
by Golden Child
Golden Child
Stunt Cycle is very similar to Gran Trak in many ways, thought I'd fiddle a little.

Attaching a clock to the score up counter and hacking a "force start" button gets you from 8 to 27 buses: (don't know what's happening with the ramps on score = 12)


1 member likes this
#121142 Jul 15th a 08:06 PM
by Golden Child
Golden Child
I managed to get one of the tanks displaying. It's super hacky but at least it shows something.

There's something very very wrong with one of the 74107's. Hooked up normally, IC_N1.6 GOES TO IC_M1.4 but for some reason, it never gets updated. If I put a debug net list analog output on IC_N1.6, it never gets updated, however if I put a debug net list analog output on IC_N1.5, it magically starts updating??? If it never updates properly THR1Q and THW1Q don't activate and the display window doesn't get activated.

Here you see a tank in the lower right, it jumps all around:
[Linked Image from i.imgur.com]

Got both tanks appearing, but jumping all over the place:
[Linked Image from i.imgur.com]
1 member likes this
#121141 Jul 15th a 09:29 AM
by Golden Child
Golden Child
So one of the things that had me baffled about tank was figuring out how it handles the mines. Specifically, how does it keep track of whether a mine has been hit or not?

It doesn't have a cpu, and it only has a ROM chip, no ram chips, so how does it know if a mine has been hit?

There's a dual 8 bit shift register, the Signetics N8277, that is used as a 16 bit shift register and that's enough to hold 1 bit of state for each mine.

In the playfield, there's a rectangular region defined for the mines, any bit that's set in this region will be a mine, but we're only allowed 1 mine per row.

When the game starts, the shift register is cleared, a 1 bit means that the mine has been hit.


As the playfield gets scanned vertically, this shift register gets cycled through and updated, collision with either tank1 or tank2 will remove the mine (set the bit to 1 that will get shifted in on the next clock).
The D0A and D1A are set so that it inverts the input DSA on pin 4.


[Linked Image from i.imgur.com]
1 member likes this
#121139 Jul 15th a 03:02 AM
by Golden Child
Golden Child
It's interesting to study the different Atari TTL games of this period as they have quite a bit of similarities.

I thought I'd try to figure out how the rom in tank works too:


Code

f = io.open("/mnt/z/mame/roms/tank/90-2006.k10","r")  a = f: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 end
function bit(x,y) return (x >> y) & 1 end

for score=0,63 do for v=0,7 do adr=((score<<3) | v | (1<<10)) io.write(score.." "..v..":") prtbyte(adr, a:byte(adr+1)) print() end end
for dir=0,31 do for v=0,7 do for h = 0,1 do adr=(v | bit(dir,4)<<3 | h<<4 | (dir & 0xf) << 5 | 1 << 10 | 1 << 9) prtbyte(nil,a:byte(adr+1)) end print() end print(string.rep("=",16))  end
for v=0,31 do for h=0,15 do adr=((v<<4) | h | (0<<9)) if h~=7 then prtbyte(nil,a:byte(adr+1)) end end print() end  -- playfield 0
for v=0,31 do for h=0,15 do adr=((v<<4) | h | (1<<9)) if h~=7 then prtbyte(nil,a:byte(adr+1)) end end print() end  -- playfield 1



Code
for v=0,31 do for h=0,15 do adr=((v<<4) | h | (0<<9)) if h~=7 then prtbyte(nil,a:byte(adr+1)) end end print() end  -- playfield 0
 6  3210 6       6 4     6 4   0 6 4  1  65   1  654  1 7     107  4  107  4  1 7 5   1 7 54  1 7 54   07 54    76      
76  321076  321 7 54321 7 5432 07 5432  7 5 32  7  432  7   3 10 6543 10 65432   65 32   6 432   6 432 0 6 4321  6  321 
7   3210                                          5 3 1 7 5 3                                                           
                  5432107654321076543210765432  7             1  6543210765432107654321076543                           
                                                                                                                        
        76543210765432107654321076543210765432107654321076543210765432107654321076543210765432107654321076      76543210
76543210        76                              7                  4                                    76              
76543210        76                              7                  4                                    76              
              1076                              7       7654       4             6                      76              
                76        5432107654                    7654                                3210        76              
                76        543210                             2                              3210        76              
                76        543210                 6                        5432              3210        76              
                76                                                 4      5432                          76              
                76         4                             6                5432                          76              
                76               6           2                                         0                76              
                76                                               6                                      76      76543210
                76                                 4                                                    76      76543210
                76              76543                      4                  1                         76      76543210
                76              765432107654                         2                    54321         76              
                76              765432107654         2                                    54321         76              
                76                             0                                    32107654321         76              
                76     0                                       0                                        76              
           4    76                                     0                                                76              
                76                     0                             2                                  76              
76543210        76        5432                   6                        54321076543                   76              
                76        5432                             4              54321076543                   76              
                76        5432                     4321         765          210                        76              
                76        5432        1076         4321         765          210            3           76       6543210
                76                    1076                      765                                     76              
                76                    1076                      765432                                  76              
                76                    1076                      765432                                  76              
7 5 3 10        765432107654321076543210765432107654321076543210765432107654321076543210765432107654321076              
> 



 for v=0,31 do for h=0,15 do adr=((v<<4) | h | (1<<9)) if h~=7 then prtbyte(nil,a:byte(adr+1)) end end print() end
 6  3210 6       6 4     6 4   0 6 4  1  65   1  654  1 7     107  4  107  4  1 7 5   1 7 54  1 7 54   07 54    76      
76  321076  321 7 54321 7 5432 07 5432  7 5 32  7  432  7   3 10 6543 10 65432   65 32   6 432   6 432 0 6 4321  6  321 
7   3210                                          5 3 1 7 5 3                                                           
                  5432107654321076543210765432  7             1  6543210765432107654321076543                           
                                                                                                                        
        76543210765432107654321076543210765432107654321076543210765432107654321076543210765432107654321076      76543210
76543210        76                                    10                      10                        76              
76543210        76                                    10                      10                        76              
                76                                    10                                                76              
                76        5432107654                  10            3210                765432          76              
                76              7         54                 2        10                                76              
                76              7         54     6                    10      10                        76              
                76                        54                       4                      543   7   3   76              
                76                                       6                                54            76              
                7654321076                   2                        1076          32107654            76              
                76                                               6    10                                76      76543210
                76                  32107654       4                  10                                76      76543210
                76                        54               4                                  1076543   76      76543210
                76                        54                         2                        10        76              
                76      76543210                     2                           6543210   43210        76              
                76                             0                                                        76              
                76                                             0        76543210                        76              
           4    76                54                   0                                                76              
                76    107654      54      54                         2                  76              76              
76543210        76        54              54     6                                      76              76              
                76        54              54               4          10                76              76              
                76                        5432        10        76543210      10                        76              
                76                                              76            10                        76       6543210
                76                               65                           10              10        76              
                76            10                                                              10        76              
                76            10                      10                                      10        76              
7 5 3 10        765432107654321076543210765432107654321076543210765432107654321076543210765432107654321076           



0 0:400:        
0 1:401:     210
0 2:402:     2 0
0 3:403:     2 0
0 4:404:     2 0
0 5:405:     2 0
0 6:406:     2 0
0 7:407:     210
1 0:408:        
1 1:409:     21 
1 2:40a:      1 
1 3:40b:      1 
1 4:40c:      1 
1 5:40d:      1 
1 6:40e:      1 
1 7:40f:     210
2 0:410:        
2 1:411:     210
2 2:412:     2 0
2 3:413:       0
2 4:414:     210
2 5:415:     2  
2 6:416:     2  
2 7:417:     210
3 0:418:        
3 1:419:     210
3 2:41a:     2 0
3 3:41b:       0
3 4:41c:      10
3 5:41d:       0
3 6:41e:     2 0
3 7:41f:     210
4 0:420:        
4 1:421:     2  
4 2:422:     2 0
4 3:423:     2 0
4 4:424:     2 0
4 5:425:     210
4 6:426:       0
4 7:427:       0
5 0:428:        
5 1:429:     210
5 2:42a:     2  
5 3:42b:     2  
5 4:42c:     210
5 5:42d:       0
5 6:42e:     2 0
5 7:42f:     210
6 0:430:        
6 1:431:     210
6 2:432:     2 0
6 3:433:     2  
6 4:434:     210
6 5:435:     2 0
6 6:436:     2 0
6 7:437:     210
7 0:438:        
7 1:439:     210
7 2:43a:     2 0
7 3:43b:       0
7 4:43c:       0
7 5:43d:       0
7 6:43e:       0
7 7:43f:       0
8 0:440:        
8 1:441:     210
8 2:442:     2 0
8 3:443:     2 0
8 4:444:     210
8 5:445:     2 0
8 6:446:     2 0
8 7:447:     210
9 0:448:        
9 1:449:     210
9 2:44a:     2 0
9 3:44b:     2 0
9 4:44c:     210
9 5:44d:       0
9 6:44e:     2 0
9 7:44f:     210
10 0:450:        
10 1:451: 65  210
10 2:452:  5  2 0
10 3:453:  5  2 0
10 4:454:  5  2 0
10 5:455:  5  2 0
10 6:456:  5  2 0
10 7:457: 654 210





      1076      
       07       
 6543  07  4321 
 65432107654321 
 65432107654321 
 65432107654321 
 6543      4321 
                
================
        76543   
         65     
  5432  76  3210
  5432107654321 
 65432107654321 
 6543210765432  
76543     5432  
                
================
         65432  
   4321   54    
  54321  65   10
  54321076543210
 65432107654321 
7654     65432  
         6543   
                
================
           432  
   43210   43210
  54321   54    
 6543210765  210
7654321076543210
765     7654321 
         65432  
        76543   
================
     210   43   
   43210   43210
 654321  654    
76543210765  210
765   1076543210
        765432  
       07654    
       076      
================
      107       
   4321076  321 
76543210   43210
 65432107654    
     210765 3210
      1076543210
    321076543   
     21076      
================
      1076      
 654321076   21 
 65432107   3210
    321076543 10
     210765     
     21076543   
   4321076543   
    3210        
================
       07654    
 65432107654    
 654321076    10
     21076543210
     21076    10
     21076543   
   4321076543   
    32107       
================
                
  5432107654    
  5432107654    
    321076    10
    321076543210
    321076    10
  5432107654    
  5432107654    
================

1 member likes this
#121133 Jul 8th a 09:02 AM
by Golden Child
Golden Child
JD left another clue in the code:
Code
 // TTL_74193(name, A, B, C, D, CLEAR, LOADQ, CU, CD)
//	TTL_74193(L8, FIXED_RAMP_ZONE_Q, FIXED_RAMP_ZONE, P, P, JUMP_Q, LOAD_Q, P, GRAVITY) // Schematics say C and D should be to VCC - maybe ground instead?

// changed to GROUND and bike jumps!!!
	TTL_74193(L8, FIXED_RAMP_ZONE_Q, FIXED_RAMP_ZONE, GROUND, GROUND, JUMP_Q, LOAD_Q, P, GRAVITY) // Schematics say C and D should be to VCC - maybe ground instead?





I also tried to model a bunch of stuff that leads up to the SPEED_PULSES and up to R38 and R39 but it ran super slow...like over a minute to generate a single frame.
1 member likes this
#121167 Jul 24th a 05:19 PM
by Golden Child
Golden Child
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
Who's Online Now
1 members (dormml), 25 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,103
Posts119,275
Members5,019
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