domenica 21 dicembre 2008

Atari Breakout : not working PCB - Aggiornamento 3

Appena accesa la scheda, essa si pone in Attract Mode.
Come detto nei post precedenti, la pallina non viene visualizzata poichè il segnale Ball Display è allo stato basso.
Tuttavia è stato possibili forzare il segnale allo stato alto, fornendo un impulso +5v al pin#5 del gate 7408 dell'integrato designato A4 nello schema 1.
Il risultato è la visualizzazione della pallina.



Nella modalità Attract all'accensione della scheda, è del tutto normale la mancanza di casuale di alcuni mattoni del muro, i valori dei punteggi diversi da zero, ed il fatto che la pallina possa attraversare il muro per andare nella parte superiore dello schermo.

Atari Breakout : not working PCB - Aggiornamento 2

Secondo il manuale d'uso, inserendo una credito nella gettoniera:
  • la lampada del pulsante 1 Player Start si illumina
  • il pulsante Serve è spento
  • lo schermo non cambia, ovvero continua a visualizzare la stessa schermata presente prima dell'inserimento del credito

Premendo il pulsante illuminato 1 Player Start :

  • se è stato inserito un solo credito, il pulsante si spegne
  • la pallina non viene più visualizzata
  • i punteggi si azzerano
  • i mattoni del muro sono interamente visualizzati
  • la racchetta viene visualizzata
  • il punteggio azzerato del giocatore 1 lampeggia
  • il pulsante Serve si illumina

La scheda in esame si comporta come indicato nelle due situazioni sopra riportate , ad eccezione che la pallina non è mai visualizzata, il pulsante Serve è sempre illuminato

(l'immagine distorta è dovuta al mio vecchio monitor Commodore 1085 PAL. L'ingresso utilizzato è il video composito)

Atari Breakout : not working PCB - Aggiornamento 1

All' accensione della scheda, Breakout si trova in modalità Attract. L' Attract Mode ha le seguenti caratteristiche (ricavate dal manuale d'uso) :

  • sono visualizzati i punteggi dei due giocatori (valori casuali , fissi non lampeggianti)
  • la racchetta non è visibile: al suo posto una barra unisce il lato destro e sinistro del campo di gioco
  • la pallina è visualizzata; quando questa colpisce il muro , i mattoni colpiti non sono rimossi ma continuano ad essere visualizzati. Talvolta la pallina può attraversare il muro e trovarsi intrappolata tra esso e la parte superiore del campo di gioco
  • i pulsanti luminosi 1 Player Start e 2 Player Start sono spenti
  • il led Serve rimane acceso per i primi quattro secondi, per poi spegnersi definitivamente
  • il suono è disattivato

Accendendo la scheda che ho per le mani, l' Attract Mode si comporta in modo differente, in particolare:

  • la pallina non è visibile
  • il led Serve è perennemente acceso

Guardando lo schema di Breakout, si nota che quattro contatori 9316, due 3-AND gate ed un NAND costituiscono la pallina (segnale Ball). All'oscilloscopio il segnale Ball sembra correttamente generato. Esso va poi ad una serie di 74xx che abilita o meno la visibilità della pallina a seconda del caso che la scheda si trovi in Attract Mode, in Play Mode o in Serve Wait; tale segnale è denominato Ball Display , che alla fine del suo giro va ad un D flip-flop che si occupa della gestione del segnale video. All'oscilloscopio il segnale Ball Display è sempre allo stato basso, anche in Attract Mode, dove invece la pallina dovrebbe essere visualizzata (e quindi Ball Display alto).





Schema 1


Andando a verificare l'uscita Q pin#9 del 7474 (nello schema 1 è l'integrato A3) essa risulta sempre alta, mentre il Reset Asincrono pin#1 del medesimo integrato , risulta essere sempre basso. Strano davvero, considerando che dallo schema 1 il pin#9 ed il pin#1 sono collegati assieme.

All' oscilloscopio l'ingresso Set pin#1 del 7474 (A3) sembra comportarsi in modo strano, considerando che secondo lo schema 1 è generato in cascata da un AND (7408-A4), un NAND (7400-C3) e un NOR (7402-B3).











Schema 2

Siccome queste incongruenze erano pesanti, sono andato a rivedermi direttamente sul pcb il giro delle piste relative a questi integrati : il risultato è riportato in schema 2.

Come si può vedere, i gate C3 e B3 (cerchiati in rosso) non concorrono a formare il segnale che va al secondo Set del 7474, ed il primo Reset del 7474 non è dato dalla seconda uscita Q dello stesso integrato, ma bensì passa da una porta AND dell'integrato C1 che ho aggiunto allo schema 2 ; è da notare che nello schema 1, quello originale, il 7408 designato C1 non compare mai in nessuno sheets, come se non esistesse sulla pcb. A riguardo dello schema, vorrei evidenziare che i vari sheets originali riportano come numero di disegno il 004533, stesso numero che compare serigrafato sulla pcb, ad indicare che schema e pcb dovrebbero essere coincidenti, cosa che invece non sembra essere vera: la pcb ha un layout (schema 2) diverso dal layout dello schema 1 ricavato dall'originale Atari. Probabilmente una variazione di revisione (?) (Vedere Aggiornamento 4)

Tuttavia salta fuori un altro pasticcio : gli ingressi pin#12 e pin#13 del AND C1 risultano essere alti, ma la sua uscita pin#11 bassa; strano davvero per una porta AND, anche se la causa potrebbe essere addebitata ad un valore di tensione un pò bassino degli ingressi, circa 3,6 volt contro ì 4,9 di alimentazione. Appena possibile provvedo ad eliminare l'integrato C1 e verifico se sulle piazzole corrispondenti ai pin#12 e #13 la tensione sia maggiore. In tal caso il 7408 andrà sostituito.

giovedì 14 febbraio 2008

Eprom Programmer for Atari 2600 catridges

*** UPDATE March 2014 : 
the original files of this project has been lost , deads together with the pc where they were saved (remember that this is an old project dated 2008). The good news is that I'm planning to revisit the entire project, perhaps with a flash rom pin-to-pin compatible   with the old eprom ***

Here a simple eprom programmer and PC software for programming the Atari 2600 catrigde (indeed for all eprom or catrigde based on eprom like Colecovision, Vectrex,...) , suitable for eprom model 2732 up to 27C512 (in my tests I've preferred to use 27C256).

As you can see, the hardware is very simple:





  • an Atmel microcontroller that send/recive the data with PC via rs232 serial connection (the MAX233 ic can be replaced with a more cheap MAX232 or other 232 driver)

  • one fixed voltage regulator (+5V) as power supply for ICs , two non-fixed voltage regs which provide a 6,5V and 12,5V for programming operations of the eproms

  • a four microswitchs for routing the programming voltages to the eprom pins

As you can see from schematic, the eprom used is a 27C256 model, but others eproms are supported:

  1. 2732 (4 KBytes) : connect address line from A0 to A11, leave A12,A13,A14,A15 unconnected


  2. 2764 (8 KBytes) : connect address lines from A0 to A12, leave A13,A14,A15 unconnected


  3. 27C128 (16 KBytes) : connect address lines from A0 to A13, leave A14,A15 unconnected


  4. 27C256 (32 KBytes) : connect address lines from A0 to A14, leave A15 unconnected


  5. 27C512 (16 KBytes) : connect all address lines from A0 to A15

In order to keep the project cheap and esay to build, I've used a microswitch instead of dedicated ICs for switching the different voltages routes , so a few words about microswitchs are needed; during read operations , the eprom needs only +5v on both VCC and VPP pins : this is possible to keep close (ON position) the micros #1 and #3 and open #2 and #4 ; due the presence of diodes the real voltage will be around 4,75v - 4,80v , but these values are in the specs of eproms. During programming operations , first close (ON) the micro #2 and than close the #4 : in this way you can give first the 6,5v to VCC pin and than the 12,5v to VVP pin ,in according to the various eproms's datasheets concerning the voltages transition. If you want to return in read mode first open the micros #4 and than open the #2.

Also the PC software is very easy and intuitive



Hereby the commad buttons and options explanation :




  • "EXIT" button. Doesn't need more words...


  • "Open COM" : set and open the comunication between PC and programmer over serial port.


  • "Eprom Model" : you can choose the eprom model to burn.


  • "Start Address" : here you can write the address at which the programmer starts to write or read the data to/from eprom (decimal and hexadecimal value are allowed)


  • "Bankswitch" : same of above; instead to write manually a start address, you can choose a series of predefined value


  • "Nr. of Bytes" : this value is the number of bytes that should be wrote/read into eprom by programmer. This field is automaticly filled when you choose to load a "bin" file (see below)


  • "Read Start" : pressing this button, you can read the content of eprom at start address previously set , for a specified number of bytes.


  • "Save Bin" : save the content of read eprom in a file.


  • "Write Start" : write data to eprom at specified start address; the number of bytes written are equal to the number of bytes previously inserted. Before to start to write, you must load the data (see below).


  • "Load Bin" : you can load data (bin file) pressing this button; a windows is opened with the data; the field "Nr. of Bytes" is filled with the number of bytes contained in the bin file.


Features:




  • the possibility to programming only a specified portion of the eprom , at specified address for a specified number of bytes. This means that doesn't need to erase whole eprom if you want to write a blank range.



  • the possibility to "see" the eprom > 4K as a virtual "more than one" 4Kbytes eproms with the "bankswitch" method
For example if you have a 27C256 eprom (32Kbytes) and you want to fill it with five different 4Kbytes (each) Atari 2600's applications/demos/games. To do this , you can considering the 27c256 as eight 4K eproms : the first 4K eprom start at address 0x0000, the second 4K eprom start at address 0x1000, the third start at 0x2000 and so on up to 0x4000 . Hereby the steps:






  1. load the first bin file of the your first application/demo/game by clicking on "LOAD BIN" button; choose the file and than OK. A new window appears with the content of the selected file



  2. now click on "Bankswitch" and select the value 0x0000 is you want to program the file in the first 4K bank


  3. operate on the microswitchs to put all to ON as describe above


  4. than click on "WRITE START" button in order to start the programming operations; a progress bar shows the precentage of the process.


OK now ,using the same steps , you can select your second application/demo/games that you want to save on eprom, select a different bank at value 0x1000 and start the write operation; and so on...


then, you ca use this eprom in your Atari 2600; for select the game you must tied to 0 volt or tied to +5 volt the A12, A13 and A14 eprom's pins as describe in this table:


Note

As power supply, you can use a laptop PSU that usually has a 18 Vdc output.
If you want the firmware for the MCU and the software for PC program, simply email me and I will send both files. If you are not able to program the Atmel MCU, send me a blank MCU : I' ll flashed for you and I' ll send back