OpenCores
URL https://opencores.org/ocsvn/diogenes/diogenes/trunk

Subversion Repositories diogenes

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 219 to Rev 220
    Reverse comparison

Rev 219 → Rev 220

/trunk/video/snake3.bin
0,0 → 1,3
 
 
 
trunk/video/snake3.bin Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/video/snake4.bin =================================================================== --- trunk/video/snake4.bin (nonexistent) +++ trunk/video/snake4.bin (revision 220) @@ -0,0 +1,7 @@ + `ppqpfvvLvgws?s?s?s?s?s?s?s?rrrrrrrrl||q|;cOb[a??7nok{{{7lno<lo<o<o<no<`DpWa `DpXa `BpGa p8a Ia ;a Ma p;a 8a Ua Da ;a `p=a a Ga p;a Da Ja >a "@$ADT`p>a 8a Ha ``"x`ppqpa`pppd}Ct`pppdzCt +azB]h|ё`d"x#a`ppqp`b" e*d"x#xD1!1dttqtHDDaeDD? aJe +aDD? ah(58b858c8h5b5cHC4HB4!1`ppqpl|||d=Ctd=Ct`d"x#`p `ppqph`"x#l||q|xhdH+ hPdJa` e5#ST?1dJb?hdichYYYK +` @` +idhKhGm>;?;` +@m`m \ No newline at end of file
trunk/video/snake4.bin Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/video/snake4.asm =================================================================== --- trunk/video/snake4.asm (nonexistent) +++ trunk/video/snake4.asm (revision 220) @@ -0,0 +1,790 @@ +@ l7: stack +@ l6: push_function +@ l0: return address of leavfuction (push pop im speziell) + + stio l0, [l0] + + LDL l0, :start + LDL l6, :push + + ldi l7, 0x03 + jump + lsi l7, 0xfE + + +push: + st h7, [l7] + adi l7, -1 + st h1, [l7] + adi l7, -1 + st h2, [l7] + adi l7, -1 + st h3, [l7] + adi l7, -1 + st h4, [l7] + adi l7, -1 + st h5, [l7] + adi l7, -1 + st h6, [l7] + adi l7, -1 + st h0, [l7] + jump + adi l7, -1 + +pop: + adi l7, 1 + ld h0, [l7] + adi l7, 1 + ld h6, [l7] + adi l7, 1 + ld h5, [l7] + adi l7, 1 + ld h4, [l7] + adi l7, 1 + ld h3, [l7] + adi l7, 1 + ld h2, [l7] + adi l7, 1 + ld h1, [l7] + adi l7, 1 + ld h7, [l7] + nop + nop + jump + nop + + +start: + +@ initialize vmem + LDL h4, :set_tile + ldi l3, 59 @ max y +hloop: + ldi l2, 79 @ max x +pixloop: + call h0,

+ ldi l1, 0x5b + + brnz l2, :pixloop + adi l2, -1 + brnz l3, :hloop + adi l3, -1 + + +@ draw "3D" borders + ldi h6, 55 + ldi h7, 0xc1 + lsi h7, 0x02 + LDL h3, :border + call h0,

+ ldi h4, 55 + + ldi h6, 6 + ldi h7, 0xc1 + lsi h7, 0x3C + call h0,

+ ldi h4, 17 + + ldi h7, 0xc5 + call h0,

+ lsi h7, 0x3C + + ldi h7, 0xc9 + call h0,

+ lsi h7, 0x3C + + ldi h7, 0xcd + call h0,

+ lsi h7, 0x3C + + ldi h6, 17 + ldi h7, 0xd4 + call h0,

+ lsi h7, 0x3C + +@ draw static text + ldi l0, 0xcA + lsi l0, 0x44 + ldi l1, 0x57 @ X + stio l1, [l0] + ldi l0, 0xcE + lsi l0, 0x44 + ldi l1, 0x58 @ Y + stio l1, [l0] + +@ LEVEL + ldi l0, 0xc2 + lsi l0, 0x42 + ldi l1, 0x47 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3c + stio l1, [l0] + adi l0, 1 + ldi l1, 0x55 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3c + stio l1, [l0] + adi l0, 1 + ldi l1, 0x47 + stio l1, [l0] + +@ LEVEL + ldi l0, 0xc6 + lsi l0, 0x42 + ldi l1, 0x38 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x4b + stio l1, [l0] + adi l0, 1 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x47 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3c + stio l1, [l0] + adi l0, 1 + ldi l1, 0xec + stio l1, [l0] + + + +@ Andreas + ldi l0, 0xD5 + lsi l0, 0x3e + ldi l1, 0x38 @ A + stio l1, [l0] + adi l0, 1 + ldi l1, 0x49 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3b + stio l1, [l0] + adi l0, 1 + ldi l1, 0x4d + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3c + stio l1, [l0] + adi l0, 1 + ldi l1, 0x38 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x4e + stio l1, [l0] + + +@ David + ldi l0, 0xD8 + lsi l0, 0x3e + ldi l1, 0x3B @ D + stio l1, [l0] + adi l0, 1 + ldi l1, 0x38 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x55 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x44 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3b + stio l1, [l0] + +@ Fellnhofer + ldi l0, 0xD5 + lsi l0, 0xc1 + ldi l1, 0x3D + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3c + stio l1, [l0] + adi l0, 1 + ldi l1, 0x47 + stio l1, [l0] + adi l0, 1 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x49 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3f + stio l1, [l0] + adi l0, 1 + ldi l1, 0x4a + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3d + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3c + stio l1, [l0] + adi l0, 1 + ldi l1, 0x4d + stio l1, [l0] + +@ Rigler + ldi l0, 0xD8 + lsi l0, 0xc1 + ldi l1, 0x4d + stio l1, [l0] + adi l0, 1 + ldi l1, 0x44 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3e + stio l1, [l0] + adi l0, 1 + ldi l1, 0x47 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3c + stio l1, [l0] + adi l0, 1 + ldi l1, 0x4d + stio l1, [l0] + +@ & + ldi l0, 0xD7 + lsi l0, 0x44 + ldi l1, 0x5c + stio l1, [l0] + + +@ Diogenes + ldi l0, 0xDB + lsi l0, 0x3e + ldi l1, 0x3b + stio l1, [l0] + adi l0, 1 + ldi l1, 0x44 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x4a + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3e + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3c + stio l1, [l0] + adi l0, 1 + ldi l1, 0x49 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3c + stio l1, [l0] + adi l0, 1 + ldi l1, 0x4e + stio l1, [l0] + adi l0, 2 + ldi l1, 0x66 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x64 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x64 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x6c + stio l1, [l0] + adi l0, 1 + + + +@ initialize snake + ldi h3, 0x10 + lsi h3, 0x10 + ldi h1, 8 + + @ first apple + ldi h6, 16 + lsi h6, 40 + + @ intitially nothing to grow + ldi h7, 0 + +l0: + st h3, [h1] + brnz h1, :l0 + adi h1, -1 + + ldi h1, 8 @ head != tail to avoid early gameover + adi h3, 1 + st h3, [h1] + + ldi h1, 7 + ldi h2, 0 + + LDL h3, :delay + LDL h5, :update + + ldi l0, 0x00 @ loop expects key input in r0 +loop: + @ldi l0, 0x00 @simulator: 0x81 + @ldio l0, [l0] + ldi l1, 0x01 + and l2, l0, l1 @ select bit for right + sub h2, h2, l2 @ add bit to direction + shi l0, -1 @ shift input + and l2, l0, l1 + add h2, h2, l2 @ add bit to direction + + stio h2, [l0] + + @shi l0, -6 @ shift input + @and h4, l0, l1 + + +@ check for game over + adi l1, h1, 1 + ld l1, [l1] + ldi l0, 0xff + lsi l0, 0xff + and l1, l1, l0 + mov l2, h1 + adi l2, -2 + +collcheck: + ld l4, [l2] + nop + and l4, l4, l0 + xor l4, l4, l1 + brnz l4, :nocoll + nop + +@ GAME OVER + ldi l0, 0xce + lsi l0, 0x19 + ldi l1, 0x3e + stio l1, [l0] + adi l0, 1 + ldi l1, 0x38 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x48 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3c + stio l1, [l0] + adi l0, 2 + ldi l1, 0x4a + stio l1, [l0] + adi l0, 1 + ldi l1, 0x55 + stio l1, [l0] + adi l0, 1 + ldi l1, 0x3c + stio l1, [l0] + adi l0, 1 + ldi l1, 0x4d + stio l1, [l0] + + +no_key_pressed: + call h0,

@ call delay + ldi l1, 30 + brz l0, :no_key_pressed + nop + + LDL l0, :start + jump + nop + +nocoll: + brnz l2, :collcheck + adi l2, -1 + + + + +@ check for apple + adi l1, h1, 1 + ld l1, [l1] + ldi l0, 0xff + lsi l0, 0xff + xor l1, l1, h6 + and l1, l1, l0 + brnz l1, :no_apple + nop + adi h7, 8 @ grow by 8 for each apple + + + @ FIXME: use random values + ldi l4, 53 + add l0, h6, l4 + shi h0, l0, -2 + add l0, l0, h1 + +rand1: + sub l0, l0, l4 + cmpl l1, l0, l4 + brz l1, :rand1 + nop + +rand2: + sub h0, h0, l4 + cmpl l1, h0, l4 + brz l1, :rand2 + nop + + adi h0, 3 + adi l0, 3 + + mov h6, l0 + shi h6, 8 + or h6, h6, h0 + + +no_apple: + ldi l0, 0 + cmpl h4, l0, h7 + sub h7, h7, h4 + + +@ draw apple + ldi l0, 0xff + and l2, h6, l0 + mov l3, h6 + shi l3, -8 + LDL l0, :set_tile + call h0, + ldi l1, 0x06 @ apple + + + @@ display level, apples + LDL l0, :print_val + ldi l4, 0xc7 + mov l5, h1 + shi l5, -3 + call h0, + lsi l4, 0x43 + + LDL l0, :print_val + ldi l4, 0xc3 + mov l5, h1 + shi l5, -6 + call h0, + lsi l4, 0x43 + + + + + call h0,
@ call update + mov l1, h2 + + add h1, h1, h4 + + ldi l1, 10 @ 2^20 steps + mov l2, h1 + shi l2, -6 + shi l2, 2 + call h0,

@ call delay + sub l1, l1, l2 + + + + brnz h5, :loop + nop + + +update: + call l0, + nop + + brz h4, :no_grow @ if snake does not grow + mov l0, h1 + adi l0, 2 + adi h1, 1 + ld l1, [h1] @ if snake grows + nop + brnz h4, :cloope + mov l2, h1 + +no_grow: + ldi l0, 0 + ld l1, [l0] + + @ extract tile,y,x (l1=tile, l2=x, l3=y) + ldi l4, 0xff + and l2, l1, l4 + shi l1, -8 + and l3, l1, l4 + ldi l1, 0x1b + + LDL l0, :set_tile + call h0, + nop + + ldi l0, 0 + ldi l2, 1 + +cloop: + ld l1, [l2] @ src + adi l2, 1 @ src + 1 + st l1, [l0] @ dst + cmpl l3, l0, h1 @ until dst=highest address) + brnz l3, :cloop + adi l0, 1 @ dst + 1 +cloope: + + ldi l5, 3 + and h2, h2, l5 @ trunc direction + + @ extract tile,y,x (l1=tile, l2=x, l3=y) + ldi l4, 0xff + and l2, l1, l4 + shi l1, -8 + and l3, l1, l4 + + shi l1, -8 @ old direction + shi l1, 4 @ old direction << 2 + or l1, l1, h2 @ 00OO 00NN (old new combination) + adi l1, 4 + + mov h5, l0 + mov h6, l2 + mov h7, l3 + + LDL l4, :set_tile + call h0, + nop + mov l0, h5 + mov l2, h6 + mov l3, h7 + +down: + xor l4, h2, l5 + brnz l4, :up + nop + adi l3, 1 + ldi l1, 8 +up: + ldi l5, 1 + xor l4, h2, l5 + brnz l4, :right + nop + adi l3, -1 + ldi l1, 9 +right: + brnz h2, :left + ldi l5, 2 + adi l2, 1 + ldi l1, 10 +left: + xor l4, h2, l5 + brnz l4, :end_key + nop + adi l2, -1 + ldi l1, 11 +end_key: + + @ check for borders and wrap around + ldi h0, 3 + cmpl l5, l2, h0 + brz l5, :b2 + nop + ldi l2, 56 +b2: + cmpl l5, l3, h0 + brz l5, :b3 + nop + ldi l3, 56 +b3: + ldi h0, 56 + cmpl l5, h0, l2 + brz l5, :b4 + nop + ldi l2, 3 +b4: + cmpl l5, h0, l3 + brz l5, :bend + nop + ldi l3, 3 +bend: + + mov l4, h2 + shi l4, 8 + or l4, l4, l3 + shi l4, 8 + or l4, l4, l2 + st l4, [l0] @ write new head + + @@ keep x,y values + mov h2, l2 + mov h3, l3 + + LDL l0, :set_tile + call h0, + nop + + @@ display x,y values + LDL h4, :print_val + + ldi l4, 0xcb + mov l5, h2 + adi l5, -3 + call h0,

+ lsi l4, 0x43 + + ldi l4, 0xcf + mov l5, h3 + adi l5, -3 + call h0,

+ lsi l4, 0x43 + + + + ldi l0, 0 + ld l1, [l0] + @ extract tail tile,y,x (l1=tile, l2=x, l3=y) + ldi l4, 0xff + and l2, l1, l4 + shi l1, -8 + and l3, l1, l4 + ldi l0, 1 + ld l1, [l0] + nop + shi l1, -16 @ old direction + adi l1, 0x0c + + LDL l0, :set_tile + call h0, + nop + + adi h6, l6, 17 + jump
+ nop + + +set_stile: + call l0, + nop + + ldi l0, 0xff + and l2, l1, l0 + shi l1, -8 + and l3, l1, l0 + + LDL h4, :set_tile + call h0,

+ shi l1, -8 + + adi h6, l6, 17 + jump

+ nop + + +set_tile: + call l0, + nop + + ldi l4, 0xc0 @ vmem starts at 0xc000 + shi l4, 8 + + shi h3, l3, 7 + add l0, l2, h3 + add l0, l0, l4 + stio l1, [l0] + + adi h6, l6, 17 + jump
+ nop + +delay: + call l0, + nop + mov l2, l1 + shi l2, 16 + ldi l4, 0xff + shi l4, 10 + ldi l1, 0 + ldi l0, 0 +delay_loop: + ldio l3, [l1] + ldi l5, 0x0B @ filter left, right, switch + and l3, l3, l5 + brz l3, :goon + nop + brnz l4, :goon2 + adi l4, -1 + mov l0, l3 +goon: + ldi l4, 0xff + shi l4, 10 +goon2: + brnz l2, :delay_loop + adi l2, -1 + adi h6, l6, 17 + jump
+ nop + +print_val: + call l0, + nop + +ldi h1, 100 +pre_loop: +ldi h0, 0x63 +add l5,l5,h1 +count_loop: +sub l5,l5,h1 +cmpl l0, l5, h1 +brz l0, :count_loop +adi h0, 1 +stio h0, [l4] +adi l4, 1 +ldi l0, 10 +xor l0,l0,h1 +brnz l0, :pre_loop +ldi h1, 10 +ldi h0, 0x64 +add h0, h0, l5 +stio h0, [l4] + + + adi h6, l6, 17 + jump
+ nop + +border: + call l0, + nop + + shi h6, 7 + ldi h5, 0x17 + fory: + mov l4, h4 + adi l5, h5, 2 + forx: + add l3, h7, l4 + add l3,l3, h6 + stio l5, [l3] + adi l5, h5, 1 + brnz l4, :forx + adi l4, -1 + stio h5, [l3] + ldi l0,0x1d + xor l0, l0, h5 + brz l0, :end_border + ldi h5, 0x1a + ldi l0, 0x80 + sub h6,h6,l0 + brnz h6, :fory + nop + brnz l0, :fory + ldi h5, 0x1d + +end_border: + adi h6, l6, 17 + jump
+ nop + + +stop +

trunk/video/snake4.asm Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/video/snake.bin =================================================================== Index: trunk/video/snake.bin =================================================================== --- trunk/video/snake.bin (nonexistent) +++ trunk/video/snake.bin (revision 220)
trunk/video/snake.bin Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/sim/sendv =================================================================== --- trunk/sim/sendv (nonexistent) +++ trunk/sim/sendv (revision 220) @@ -0,0 +1,33 @@ +ELF044 (!444  TTT\ \    @`   hhh QtdRtd   e(/lib/ld-linux.so.2GNU  + +   # )Kze 4Szm(@YQ9o/Gl!`w__gmon_start__libc.so.6printfstdoutperrorputscfgetispeedfflushcfsetispeedwritecfsetospeedgetchartcgetattr_IO_stdin_used__libc_start_mainopenfcntltcsetattrcloseGLIBC_2.0ii +`   $ +( , 0 +48<UA5%%h%h%h% h%h %h(%h0%h8p% h@`%$hHP%(hP@%,hX0%0h` %4hh%8hp%<hx1^PTRh0h@QVh؈/US[ÔtX[ÐU=dt HҡHudÐUtt $ÐUhEED$E$E$bEEE}}wE}}w}}r{}}}}} } w} +} +{}}}}EE2|EnsEjEaEXE,OEXFE=E4E` +E"E%EKEEEUXEĉD$E$0D$Eĉ$D$Eĉ$:E +E̋E%E̋Ẽ࿉E̋ẼωE̋Ẽ0E̍EĉD$D$E$/ÍL$qUQ$ED$ $,hhu$EhD$D$$h$D$$Bkh$h$UD$$BAOEuEhD$ED$$ED$$K`$E[EEu}~$Qh$EE$Y]aÐU]Ít&'UWVS\é)Et01֍'EGD$E D$E$9}u[^_]Ë$ÐUS t1ۍ'ЋuX[]US[Y[/dev/ttyUSB0open_port: Unable to open /dev/ttyUSB0 - baud=%d +%02x + +=> + +  +o tD + xoXoo2 6FVfvƅօ&GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3), T&$/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crti.S/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/csuGNU AS 2.16.1/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crtn.S/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/csuGNU AS 2.16.1%%l +/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csucrti.S3,:W#,:T ,:Wdd,,Wl +/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csucrtn.S .symtab.strtab.shstrtab.interp.note.ABI-tag.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_lineTT#hh 51o  $; DD0CttKo22&XoXX g xxp  yt  00 + XXX     L@@ `L LHX`  Rr 9 | Th Dt2Xx  +  0 +X  @` (/:T + dH + +)X7C +/Y   @ z0 +(0 +/B Q elz@ hQ&D3@g +C9UofLrlw`Ԇt +LlH + +؈M + + abi-note.S../sysdeps/i386/elf/start.Sinit.cinitfini.c/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crti.Scall_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__completed.5691p.5689__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_aux/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crtn.Ssendv.c_GLOBAL_OFFSET_TABLE___init_array_end__init_array_start_DYNAMICdata_startopen@@GLIBC_2.0__libc_csu_fini_startgetchar@@GLIBC_2.0__gmon_start___Jv_RegisterClasses_fp_hwcfgetispeed@@GLIBC_2.0_finiwrite@@GLIBC_2.0__libc_start_main@@GLIBC_2.0tcgetattr@@GLIBC_2.0perror@@GLIBC_2.0_IO_stdin_used__data_startfflush@@GLIBC_2.0fdcfsetospeed@@GLIBC_2.0__dso_handle__libc_csu_initprintf@@GLIBC_2.0close@@GLIBC_2.0__bss_start_endstdout@@GLIBC_2.0puts@@GLIBC_2.0tcsetattr@@GLIBC_2.0fcntl@@GLIBC_2.0getbaud_edatacfsetispeed@@GLIBC_2.0initport__i686.get_pc_thunk.bxmain_init \ No newline at end of file
trunk/sim/sendv Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/sim/sim =================================================================== --- trunk/sim/sim (nonexistent) +++ trunk/sim/sim (revision 220) @@ -0,0 +1,57 @@ +ELF4%4 (!444  TTThh   \:   hhh QtdRtd   e(/lib/ld-linux.so.2GNU  + +  + )KgUaI4 4Qc3C'9&$X!i=A^r$.__gmon_start__libc.so.6stdoutputsfprintfstdin_IO_getcfreadfgetcsprintffclosefputcexitfopen_IO_putc_IO_stdin_used__libc_start_mainGLIBC_2.1GLIBC_2.0ii +ii +   $ +( , 0 +4U- +5%%h%h%h% h%h %h(%h0%h8p% h@`%$hHP%(hP@%,hX0%0h` %4hh1^PTRhPh`QVhUS[)tX[ÐU=İt HҡHuİÐUtt $ÐUE M]Í'U]Ít&'U]Ít&'UU]Ѓ(%$%,0HÍUE%p w-$(, +0 ȉ&]Ë$(] ,ȉË0,]á(,] $Ë$(] ,1ȉË$(] , ȉË$(] ,!ȉË($] ,)ȉ +US,E1ڨ@u Hȉ[]Ë +Hx[]Ë[]Ð&UVSu] ڃ`уT@p` +t +[^][p^]Í&'UE ueu0$](;С,Ít&$](;С,Ít&Ed]vUWԔVS E|$$D$$1ۉt$'tz`C|$$M*u +1ۍ&'$Ct$|$$uNuƉ<$ [^_]$ [^_]ÍUHE]]uu }u`]u}]øt$ \$D$$f%fug%=Su1'؋!F +#T$$@uE]u}]@uIÁ\$D$ t$|$$ȓ<f?`9<%`D$8D$4D$0D$,D$(D$$|D$ xD$tD$pD$lD$hD$ dD$`$D$kI]u }Ehu]vUSUE u`[]fyƒtҸt'1[]á$/tD$$U륍'UEED$E $)E$~v'U]]$}u߃4ȉ؃ ҃w$HL$$k]u}]Å ;F փ5,Ѓ1!@ t눡(, %Y(, %*,t$ $D$ ,4 +L5`@,4 ,%fUS `4$8@D`dLP14u\$$%t!$8 uj[]Ít&\$$u2\$$ +um\$$ tf$롉$8 tvdD$P$D9,n[]É$#E$2t&'US(] $8t   ÍC X[]ÍU$#$fL$qUWVSQ9Y<|$C$P\$ L$\$$@ @<<D$$ZE&u1ہ`t&<$C@uE}@uщ<$1tBCf<; !Ƹ)i€9uƉ$u1Y[^_]a>t$$ +$pnU]Ít&'UWVS\És)Et01֍'EGD$E D$E$9}u[^_]Ë$ÐUS t1ۍ'ЋuX[]US[4Y[g=Z̎|MUNKNOWN INSTRUCTIION (former compare greater) storeio: 0x%02x->[0x%02x] +->PROGRAM-MEM address: 0x%04x (full 0x%08x) data: 0x%04x (full: 0x%08x) + Speicher: %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x + UART ad(%x): cannot open video ram file video.ram (VIDEO RAM unititialized!)pic%04d.tgaw+picture output fileLED: read from UART %2X +Unknown OperationUSAGE: + sim +rBinary File '%s' not found +video.ram  +ohH + p|do4oo *:JZjzʅڅy]GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3), $&$/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crti.S/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/csuGNU AS 2.16.1/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crtn.S/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/csuGNU AS 2.16.1%%l +/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csucrti.S3,:W#,:$ ,:Wdd,,Wl +/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csucrtn.S .symtab.strtab.shstrtab.interp.note.ABI-tag.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_lineTT#hh 51o,; HH ChhKo$Xo440g ddp ||p yt +  Ddd    D@@ L  8  !X!`@# `#R$* 9 |2ThHh4d | +   + d  @ (/:$ + İHP + +)d7CВ +/Y   @ 4`*  #P +3 +: +F +OD +V e y І +$@H05 +$4@<(3* +0s +5DBS`g +c9u@Q +{L@& +$`b +` @} +hp +pJ +% ++`0D0IAZ`gn,q +ǒ +i + h +abi-note.S../sysdeps/i386/elf/start.Sinit.cinitfini.c/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crti.Scall_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__completed.5691p.5689__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_aux/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crtn.Ssim.c_GLOBAL_OFFSET_TABLE___init_array_end__init_array_start_DYNAMICdata_startsprintf@@GLIBC_2.0headerPC__libc_csu_fini_startsim_graphicmem_dumpdecode__gmon_start___Jv_RegisterClasses_fp_hwregdump_finiRA__libc_start_main@@GLIBC_2.0_IO_getc@@GLIBC_2.0load_regSIMM6execute_IO_stdin_usedis_load__data_startloadedfclose@@GLIBC_2.1RBfopen@@GLIBC_2.1storeload__dso_handlefgetc@@GLIBC_2.0__libc_csu_initprintf@@GLIBC_2.0arithload_iobail_outfprintf@@GLIBC_2.0DMEM__bss_startpcolorglobal_vramRfputc@@GLIBC_2.0stdin@@GLIBC_2.0compare_endstdout@@GLIBC_2.0puts@@GLIBC_2.0specialbranchusagePMEM_IO_putc@@GLIBC_2.0IMM8fread@@GLIBC_2.0load_address_edataRDexit@@GLIBC_2.0bit_is_0__i686.get_pc_thunk.bxmain_initaddshift \ No newline at end of file
trunk/sim/sim Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/sim/send =================================================================== --- trunk/sim/send (nonexistent) +++ trunk/sim/send (revision 220) @@ -0,0 +1,31 @@ +ELF44 (!444  TTT, ,    H`   hhh QtdRtd   e(/lib/ld-linux.so.2GNU   +  +# )Kzq ;Zzylz/(<G`Q9o6Nl!`ԋ__gmon_start__libc.so.6printfstdoutusleepperrorputscfgetispeedfflushcfsetispeedwritecfsetospeedreadgetchartcgetattr_IO_stdin_used__libc_start_mainopenfcntltcsetattrcloseGLIBC_2.0ii +`   $ +( , 0 +48<@DUi5%%h%h%h% h%h %h(%h0%h8p% h@`%$hHP%(hP@%,hX0%0h` %4hh%8hp%<hx%@h%Dh1^PTRhhQVhHUS[$tX[ÐU=dt PҡPudÐUtt $ÐUhEED$E$uE$:EEE}}wE}}w}}r{}}}}} } w} +} +{}}}}EE2|EnsEjEaEXE,OEXFE=E4E` +E"E%EKEEEUXEĉD$E$D$Eĉ$D$Eĉ$2E +E̋E%E̋Ẽ࿉E̋ẼωE̋Ẽ0E̍EĉD$D$E$'ÍL$qUQ$ED$ $؋hhu$iEKhD$D$$h$D$$ch$h$UD$$9[EuE$hD$ED$$ED$$`$E'EEu}~$!$ {#ED$$`$fhD$UT$$h$iEE$Y]aÐU]Ít&'UWVS\')Et01֍'EGD$E D$E$9}u[^_]Ë$ÐUS t1ۍ'ЋuX[]US[4$Y[/dev/ttyUSB0open_port: Unable to open /dev/ttyUSB0 - baud=%d +%02x + +=> + + P +o(L + ooof ~΅ޅ.>N^n~GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3),P Ć&$̋e/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crti.S/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/csuGNU AS 2.16.1/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crtn.S/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/csuGNU AS 2.16.1%%l +/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csucrti.S3,:WP#,:Ć ,:Wdd,,Wl +/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csucrtn.S̋e .symtab.strtab.shstrtab.interp.note.ABI-tag.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_lineTT#hh 51o(($; LLPCKoff*Xo g p  yPPthh0 Ћ X((     THH `T TPX` (Rz 9  1Th(Lf  +P h  +Ћ(  H` (/:Ć + dP +  +)(7C +/Y   H z +' +.A P dЋkzz<ԋH-h0QGLTg +d9voTl`Dt +Tl +w +&H ++P abi-note.S../sysdeps/i386/elf/start.Sinit.cinitfini.c/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crti.Scall_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__completed.5691p.5689__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_aux/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crtn.Ssend.c_GLOBAL_OFFSET_TABLE___init_array_end__init_array_start_DYNAMICdata_startopen@@GLIBC_2.0__libc_csu_fini_startgetchar@@GLIBC_2.0__gmon_start___Jv_RegisterClasses_fp_hwcfgetispeed@@GLIBC_2.0_finiwrite@@GLIBC_2.0__libc_start_main@@GLIBC_2.0tcgetattr@@GLIBC_2.0read@@GLIBC_2.0perror@@GLIBC_2.0usleep@@GLIBC_2.0_IO_stdin_used__data_startfflush@@GLIBC_2.0fdcfsetospeed@@GLIBC_2.0__dso_handle__libc_csu_initprintf@@GLIBC_2.0close@@GLIBC_2.0__bss_start_endstdout@@GLIBC_2.0puts@@GLIBC_2.0tcsetattr@@GLIBC_2.0fcntl@@GLIBC_2.0getbaud_edatacfsetispeed@@GLIBC_2.0initport__i686.get_pc_thunk.bxmain_init \ No newline at end of file
trunk/sim/send Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/sim/sendb =================================================================== --- trunk/sim/sendb (nonexistent) +++ trunk/sim/sendb (revision 220) @@ -0,0 +1,31 @@ +ELF44 (!444  TTT HPhhh QtdRtde(/lib/ld-linux.so.2GNU    + +  @ |CEKqXz1  d|zXQ<QJ9o_plTLLȅ tlibncurses.so.5_init_fini_Jv_RegisterClasses__gmon_start__libc.so.6printfusleepperrorputscfgetispeedcfsetispeedwritecfsetospeedgetchartcgetattr_IO_stdin_used__libc_start_mainopenfcntltcsetattrclose_edata__bss_start_endGLIBC_2.0@ii +   +$ ( , +048<UAc5%%h%h%h% h%h %h(%h0%h8p% h@`%$hHP%(hP@%,hX0%0h` %4hh%8hp%<hx1^PTRhhЊQVh/US[tX[ÐU=Lt HҡHuLÐUtt $ÐUhEED$E$E$bEEE}}wE}}w}}r{}}}}} } w} +} +{}}}}EE2|EnsEjEaEXE,OEXFE=E4E` +E"E%EKEEEUXEĉD$E$0D$Eĉ$D$Eĉ$:E +E̋E%E̋Ẽ࿉E̋ẼωE̋Ẽ0E̍EĉD$D$E$/ÍL$qUQ$ED$ $,PPu$EPD$D$$P$D$$ҋkP$P$UD$$ҋA PD$ED$$EEEu$ۋ#$PP$EE$Y]aÐU]Ít&'UWVS\)Et01֍'EGD$E D$E$9}u[^_]Ë$ÐUSt1ۍ'ЋuX[]US[tY[/dev/ttyUSB0open_port: Unable to open /dev/ttyUSB0 - baud=%d + + +=> + +@ ȅ +to4p + H@o oo&6FVfvƆֆGCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3)GCC: (GNU) 4.1.1 (Gentoo 4.1.1-r3),tȅ &$݅/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crti.S/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/csuGNU AS 2.16.1/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crtn.S/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/csuGNU AS 2.16.1%%l +/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csucrti.St3,:Wȅ#,: ,:Wdd,,Wl +/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csucrtn.S݅ .symtab.strtab.shstrtab.interp.note.ABI-tag.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_lineTT#hh 51o44<; ppCKo0Xo   g @@p HH yȅttt  R   L@@ LLLHX`  Rr 9 l Th4p @ H +ȅ   +t @L (/: + LH@ +p +)7C@ +/Y@ z +( +/B Q eltz<@ PQ&D3Њg +C9UofLrTwt +Ll +7 +! +ȅ abi-note.S../sysdeps/i386/elf/start.Sinit.cinitfini.c/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crti.Scall_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__completed.5691p.5689__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_aux/var/tmp/portage/sys-libs/glibc-2.5/work/build-default-i686-pc-linux-gnu-nptl/csu/crtn.Ssendb.c_GLOBAL_OFFSET_TABLE___init_array_end__init_array_start_DYNAMICdata_startopen@@GLIBC_2.0__libc_csu_fini_startgetchar@@GLIBC_2.0__gmon_start___Jv_RegisterClasses_fp_hwcfgetispeed@@GLIBC_2.0_finiwrite@@GLIBC_2.0__libc_start_main@@GLIBC_2.0tcgetattr@@GLIBC_2.0perror@@GLIBC_2.0usleep@@GLIBC_2.0_IO_stdin_used__data_startfdcfsetospeed@@GLIBC_2.0__dso_handle__libc_csu_initprintf@@GLIBC_2.0close@@GLIBC_2.0__bss_start_endputs@@GLIBC_2.0tcsetattr@@GLIBC_2.0fcntl@@GLIBC_2.0getbaud_edatacfsetispeed@@GLIBC_2.0initport__i686.get_pc_thunk.bxmain_init \ No newline at end of file
trunk/sim/sendb Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/sim/sendb.c =================================================================== --- trunk/sim/sendb.c (nonexistent) +++ trunk/sim/sendb.c (revision 220) @@ -0,0 +1,98 @@ +#include /* Standard input/output definitions */ +#include /* String function definitions */ +#include /* UNIX standard function definitions */ +#include /* File control definitions */ +#include /* Error number definitions */ +#include /* POSIX terminal control definitions */ + +#include + +int getbaud(int fd) { + struct termios termAttr; + int inputSpeed = -1; + speed_t baudRate; + tcgetattr(fd, &termAttr); + /* Get the input speed. */ + baudRate = cfgetispeed(&termAttr); + switch (baudRate) { + case B0: inputSpeed = 0; break; + case B50: inputSpeed = 50; break; + case B110: inputSpeed = 110; break; + case B134: inputSpeed = 134; break; + case B150: inputSpeed = 150; break; + case B200: inputSpeed = 200; break; + case B300: inputSpeed = 300; break; + case B600: inputSpeed = 600; break; + case B1200: inputSpeed = 1200; break; + case B1800: inputSpeed = 1800; break; + case B2400: inputSpeed = 2400; break; + case B4800: inputSpeed = 4800; break; + case B9600: inputSpeed = 9600; break; + case B19200: inputSpeed = 19200; break; + case B38400: inputSpeed = 38400; break; + case B115200: inputSpeed = 115200; break; + } + return inputSpeed; +} + + +int fd; + +int initport(int fd) { + struct termios options; + // Get the current options for the port... + tcgetattr(fd, &options); + // Set the baud rates to 19200... + cfsetispeed(&options, B115200); + cfsetospeed(&options, B115200); + // Enable the receiver and set local mode... + options.c_cflag |= (CLOCAL | CREAD); + + options.c_cflag &= ~PARENB; + options.c_cflag &= ~CSTOPB; + options.c_cflag &= ~CSIZE; + options.c_cflag |= CS8; + + // Set the new options for the port... + tcsetattr(fd, TCSANOW, &options); + return 1; +} + +int main(int argc, char **argv) +{ + int ch, count=0; + + fd = open("/dev/ttyUSB0", O_RDWR | O_NOCTTY | O_NDELAY); + if (fd == -1) { + perror("open_port: Unable to open /dev/ttyUSB0 - "); + return 1; + } else { + fcntl(fd, F_SETFL, 0); + } + + printf("baud=%d\n", getbaud(fd)); + initport(fd); + printf("baud=%d\n", getbaud(fd)); + + + while(((ch=getchar())!=-1) /*|| count<256*/) { +// if(ch==-1) ch=0x00; +// usleep(100); + write(fd, &ch, 1); +// printf("%02x ", ch); + //fflush(stdout); + count++; + } + + puts("\n\n=>\n\n"); + usleep(50000); + +// while((read(fd, &ch, 1)>0) && (getch()==ERR)) { +// printf("%02x ", (unsigned char) ch); +// fflush(stdout); +// } + + close(fd); + return 0; +} +
trunk/sim/sendb.c Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.