-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c77cd63
commit 196bba8
Showing
8 changed files
with
421 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
Tak, tak. Kolejny tetris. Ale czym wyr�nia si� m�j spo�r�d innych? | ||
- Architektura - to nie pc, smartfon czy kom�rka, moja w�asna platforma oparta o mikrokontroler 8bitowy. | ||
- Kod - postanowi�em ca�� gr� napisa� w assemblerze | ||
Tak, tak. Kolejny tetris. Ale czym wyróżnia się mój spośród innych? | ||
- Architektura - to nie pc, smartfon czy komórka, moja własna platforma oparta o mikrokontroler 8bitowy. | ||
- Kod - postanowiłem całą grę napisać w assemblerze | ||
|
||
|
||
Specyfikacja | ||
Procesor: Atmega8 (8kB flash, 1kB SRAM) | ||
Obraz: 104x120px, 16kolor�w | ||
Wej�cie: Pad od Pegasusa (8 przycisk�w) | ||
D�wi�k: Mono, generowany przez PWM (niestety nie ma, brak�o czasu) | ||
Obraz: 104x120px, 16kolorów | ||
Wejście: Pad od Pegasusa (8 przycisków) | ||
Dźwięk: Mono, generowany przez PWM (niestety nie ma, brakło czasu) | ||
|
||
Dlaczego? | ||
Projekt wykonany na konkurs na serwisie Elektroda.pl. Konkurs by� bardzo dobr� motywacj� do nauki architektury AVR od najni�szego poziomu (assembler). Dodatkowo nauczy�em si� generowa� obraz VGA i poprowadzi�em projekt od pomys�u do gotowego urz�dzenia. | ||
Projekt wykonany na konkurs na serwisie Elektroda.pl. Konkurs był bardzo dobrą motywacją do nauki architektury AVR od najniższego poziomu (assembler). Dodatkowo nauczyłem się generować obraz VGA i poprowadziłem projekt od pomysłu do gotowego urządzenia. | ||
|
||
Efekt? | ||
Uko�czona, dzia�aj�ca "konsola" wraz z klonem gry Tetris, 2gie miejsce w konkursie, ponad 2 tysi�ce linii kodu w czystym assemblerze, duma z uko�czonego projektu (od projektu gry, schematu, PCB, kodu po dzia�aj�c� konsole). | ||
Ukończona, działająca "konsola" wraz z klonem gry Tetris, 2gie miejsce w konkursie, ponad 2 tysiące linii kodu w czystym assemblerze, duma z ukończonego projektu (od projektu gry, schematu, PCB, kodu po działającą konsole). | ||
|
||
Co w tym takiego trudnego? Ano to, �e nie mam biblioteki jak SDL czy Allegro, gdzie wywo�uje funkcj� do wy�wietlenia obrazka na ekranie. Nie mam �adnych funkcji, nawet systemu operacyjnego czy nawet czego� pokroju BIOSu. Wszystko musia�em zaimplementowa� samemu, w��czaj�c w to generacj� obrazu linia po linii ( czyli to, czym normalnie zajmuje si� karta graficzna ), gdzie musia�em liczy� instrukcje co do cyklu, w innym przypadku obraz rozsynchronizowywa� si� lub wy�wietla� b��dnie, nast�pnie funkcje wy�szego poziomu jak wy�wietlanie tilesa i p�niej wy�wietlanie font�w czy obrazk�w. | ||
Co w tym takiego trudnego? Ano to, że nie mam biblioteki jak SDL czy Allegro, gdzie wywołuje funkcję do wyświetlenia obrazka na ekranie. Nie mam żadnych funkcji, nawet systemu operacyjnego czy nawet czegoś pokroju BIOSu. Wszystko musiałem zaimplementować samemu, włączając w to generację obrazu linia po linii ( czyli to, czym normalnie zajmuje się karta graficzna ), gdzie musiałem liczyć instrukcje co do cyklu, w innym przypadku obraz rozsynchronizowywał się lub wyświetlał błędnie, następnie funkcje wyższego poziomu jak wyświetlanie tilesa i później wyświetlanie fontów czy obrazków. | ||
|
||
Kod: http://dl.dropbox.com/u/1753596/VGA_Tetris_src.zip | ||
Schemat i PCB: http://dl.dropbox.com/u/1753596/VGA_Tetris_schemat.zip | ||
|
||
Je�eli kogo� interesuje reszta technikalii to zapraszam tutaj: http://www.elektroda.pl/rtvforum/topic2177246.html | ||
Jeżeli kogoś interesuje reszta technikalii to zapraszam tutaj: http://www.elektroda.pl/rtvforum/topic2177246.html | ||
|
||
Tutaj projekt, w kt�rym autor wyci�gn�� wszystko z tego 8bitowca. Pe�en szacun. http://www.linusakesson.net/scene/craft/ | ||
Tutaj projekt, w którym autor wyciągnął wszystko z tego 8bitowca. Pełen szacun. http://www.linusakesson.net/scene/craft/ |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//MPD-File | ||
#ifndef(pack_C1) #declare global_pack_C1=yes; object {CAP_DIS_CERAMIC_25MM_44MM("",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-90.000000,0> rotate<0,0,0> translate<58.420000,0.000000,12.700000>}#end //ceramic disc capacitator C1 C025-024X044 | ||
#ifndef(pack_C2) #declare global_pack_C2=yes; object {CAP_DIS_CERAMIC_25MM_44MM("",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-90.000000,0> rotate<0,0,0> translate<63.500000,0.000000,12.700000>}#end //ceramic disc capacitator C2 C025-024X044 | ||
#ifndef(pack_C3) #declare global_pack_C3=yes; object {CAP_DIS_CERAMIC_25MM_44MM("",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<22.860000,0.000000,38.100000>}#end //ceramic disc capacitator C3 C025-024X044 | ||
#ifndef(pack_C4) #declare global_pack_C4=yes; object {CAP_DIS_CERAMIC_25MM_44MM("",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<58.420000,0.000000,34.290000>}#end //ceramic disc capacitator C4 C025-024X044 | ||
#ifndef(pack_C5) #declare global_pack_C5=yes; object {CAP_DIS_CERAMIC_25MM_44MM("",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-180.000000,0> rotate<0,0,0> translate<30.480000,0.000000,19.050000>}#end //ceramic disc capacitator C5 C025-024X044 | ||
#ifndef(pack_C6) #declare global_pack_C6=yes; object {CAP_DIS_CERAMIC_25MM_44MM("",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-90.000000,0> rotate<0,0,0> translate<71.120000,0.000000,40.640000>}#end //ceramic disc capacitator C6 C025-024X044 | ||
#ifndef(pack_D1) #declare global_pack_D1=yes; object {DIODE_DIS_DO35_102MM_H("1N4148DO35-10",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<33.020000,0.000000,39.370000>}#end //Diode DO35 10mm hor. D1 1N4148DO35-10 DO35-10 | ||
#ifndef(pack_D2) #declare global_pack_D2=yes; object {DIODE_DIS_DO35_102MM_H("1N4148DO35-10",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<30.480000,0.000000,39.370000>}#end //Diode DO35 10mm hor. D2 1N4148DO35-10 DO35-10 | ||
#ifndef(pack_D3) #declare global_pack_D3=yes; object {DIODE_DIS_DO35_102MM_H("1N4148DO35-10",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<27.940000,0.000000,39.370000>}#end //Diode DO35 10mm hor. D3 1N4148DO35-10 DO35-10 | ||
#ifndef(pack_IC1) #declare global_pack_IC1=yes; object {IC_DIS_DIP28("MEGA8-P","ATMEL",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<55.880000,0.000000,25.400000>translate<0,3.000000,0> }#end //DIP28 300mil IC1 MEGA8-P DIL28-3 | ||
#ifndef(pack_IC1) object{SOCKET_DIP28()rotate<0,0.000000,0> rotate<0,0,0> translate<55.880000,0.000000,25.400000>}#end //IC-Sockel 28Pin IC1 MEGA8-P | ||
#ifndef(pack_IC2) #declare global_pack_IC2=yes; object {TR_TO220_3_H("7805T",)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-180.000000,0> rotate<0,0,0> translate<21.590000,0.000000,22.860000>}#end //TO220 horizontal straight leads IC2 7805T TO220H | ||
#ifndef(pack_Q1) #declare global_pack_Q1=yes; object {SPC_XTAL_5MM("",3,)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-180.000000,0> rotate<0,0,0> translate<60.960000,0.000000,17.780000>}#end //Quarz 4,9MM Q1 QS | ||
#ifndef(pack_R1) #declare global_pack_R1=yes; object {RES_DIS_0207_10MM(texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-180.000000,0> rotate<0,0,0> translate<48.260000,0.000000,17.780000>}#end //Discrete Resistor 0,3W 10MM Grid R1 0207/10 | ||
#ifndef(pack_R2) #declare global_pack_R2=yes; object {RES_DIS_0207_10MM(texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-90.000000,0> rotate<0,0,0> translate<52.070000,0.000000,36.830000>}#end //Discrete Resistor 0,3W 10MM Grid R2 0207/10 | ||
#ifndef(pack_R3) #declare global_pack_R3=yes; object {RES_DIS_0207_10MM(texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-90.000000,0> rotate<0,0,0> translate<49.530000,0.000000,36.830000>}#end //Discrete Resistor 0,3W 10MM Grid R3 0207/10 | ||
#ifndef(pack_R4) #declare global_pack_R4=yes; object {RES_DIS_0207_10MM(texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-90.000000,0> rotate<0,0,0> translate<46.990000,0.000000,36.830000>}#end //Discrete Resistor 0,3W 10MM Grid R4 0207/10 | ||
#ifndef(pack_R5) #declare global_pack_R5=yes; object {RES_DIS_0207_10MM(texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<46.990000,0.000000,44.450000>}#end //Discrete Resistor 0,3W 10MM Grid R5 0207/10 | ||
#ifndef(pack_R6) #declare global_pack_R6=yes; object {RES_DIS_0207_10MM(texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<44.450000,0.000000,46.990000>}#end //Discrete Resistor 0,3W 10MM Grid R6 0207/10 | ||
#ifndef(pack_R7) #declare global_pack_R7=yes; object {RES_DIS_0207_10MM(texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,0.000000,0> rotate<0,0,0> translate<41.910000,0.000000,49.530000>}#end //Discrete Resistor 0,3W 10MM Grid R7 0207/10 | ||
#ifndef(pack_R8) #declare global_pack_R8=yes; object {RES_DIS_0207_10MM(texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<63.500000,0.000000,44.450000>}#end //Discrete Resistor 0,3W 10MM Grid R8 0207/10 | ||
#ifndef(pack_R9) #declare global_pack_R9=yes; object {RES_DIS_0207_10MM(texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-90.000000,0> rotate<0,0,0> translate<59.690000,0.000000,44.450000>}#end //Discrete Resistor 0,3W 10MM Grid R9 0207/10 | ||
#ifndef(pack_R10) #declare global_pack_R10=yes; object {RES_DIS_0207_10MM(texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture{pigment{checker Black White}finish{phong 0.2 ambient (0.1 * global_ambient_mul)}},texture {T_Gold_5C finish{reflection 0.1}},)translate<0,0,0> rotate<0,0.000000,0>rotate<0,-270.000000,0> rotate<0,0,0> translate<67.310000,0.000000,38.100000>}#end //Discrete Resistor 0,3W 10MM Grid R10 0207/10 | ||
#ifndef(pack_SV1) #declare global_pack_SV1=yes; object {CON_BL_1X5()translate<0,0,0> rotate<0,0.000000,0>rotate<0,-180.000000,0> rotate<0,0,0> translate<49.530000,0.000000,13.970000>}#end //Female Header 5Pin 1Row (con-lsta.lib) SV1 FE05-1 |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.