LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Sponsors
  • Mirrors
  • Logos
  • Contact us
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cvs-checkins > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: cvs at opencores.org<cvs@o...>
    Date: Fri Sep 30 01:44:14 CEST 2005
    Subject: [cvs-checkins] MODIFIED: tv80 ...
    Top
    Date: 00/05/09 30:01:44

    Modified: tv80/tests Makefile basic_uart.c rc4.c rc4.h
    Added: tv80/tests stdint.h
    Log:
    Added back files lost after server crash




    Revision Changes Path
    1.3 tv80/tests/Makefile

    http://www.opencores.org/cvsweb.shtml/tv80/tests/Makefile.diff?r1=1.2&r2=1.3

    (In the diff below, changes in quantity of whitespace are not shown.)

    Index: Makefile
    ===================================================================
    RCS file: /cvsroot/ghutchis/tv80/tests/Makefile,v
    retrieving revision 1.2
    retrieving revision 1.3
    diff -u -b -r1.2 -r1.3
    --- Makefile 18 Oct 2004 21:54:32 -0000 1.2
    +++ Makefile 29 Sep 2005 23:44:12 -0000 1.3
    @@ -25,6 +25,15 @@
    bintr.ihx : bintr.c bintr_crt0.o
    $(CC) --no-std-crt0 bintr.c bintr_crt0.o

    +rc4.o : rc4.c
    + $(CC) -c -I. $^
    +
    +rc4test.o : rc4test.c
    + $(CC) -c -I. $^
    +
    +rc4test.ihx : rc4test.o rc4.o
    + $(CC) $^
    +
    clean :
    rm -f *.map
    rm -f *.mem



    1.2 tv80/tests/basic_uart.c

    http://www.opencores.org/cvsweb.shtml/tv80/tests/basic_uart.c.diff?r1=1.1&r2=1.2

    (In the diff below, changes in quantity of whitespace are not shown.)

    Index: basic_uart.c
    ===================================================================
    RCS file: /cvsroot/ghutchis/tv80/tests/basic_uart.c,v
    retrieving revision 1.1
    retrieving revision 1.2
    diff -u -b -r1.1 -r1.2
    --- basic_uart.c 10 Mar 2005 23:09:42 -0000 1.1
    +++ basic_uart.c 29 Sep 2005 23:44:12 -0000 1.2
    @@ -62,14 +62,14 @@
    // fail if status byte indicates anything other
    // than data ready and transmitter empty
    if (status != 0x61) {
    - print ("Incorrect status byte");
    + print ("Incorrect status byte\n");
    sim_ctl_port = 0x02;
    }

    // read the sent byte and fail if it's not what we sent
    data = uart_dm0;
    if (data != pattern) {
    - print ("Data miscompare");
    + print ("Data miscompare\n");
    sim_ctl_port = 0x02;
    }
    }



    1.2 tv80/tests/rc4.c

    http://www.opencores.org/cvsweb.shtml/tv80/tests/rc4.c.diff?r1=1.1&r2=1.2

    (In the diff below, changes in quantity of whitespace are not shown.)

    Index: rc4.c
    ===================================================================
    RCS file: /cvsroot/ghutchis/tv80/tests/rc4.c,v
    retrieving revision 1.1
    retrieving revision 1.2
    diff -u -b -r1.1 -r1.2
    --- rc4.c 30 Jun 2005 21:49:50 -0000 1.1
    +++ rc4.c 29 Sep 2005 23:44:12 -0000 1.2
    @@ -38,6 +38,19 @@

    void swap_bytes(uint8_t *a, uint8_t *b)
    {
    + /*
    + _asm
    + ld d,4(ix)
    + ld e,5(ix)
    + ld h,6(ix)
    + ld l,7(ix)
    + ld a, (de) + ld b, a + ld a, (hl) + ld (de), a + ld (hl), b + _endasm; + */ uint8_t temp; temp = *a; @@ -55,15 +68,42 @@ int i; /* Initialize state with identity permutation */ +#ifndef ORIGINAL_C + _asm + ld d, 4(ix) + ld e, 5(ix) + ld b, #255 +state_init: + ld h, #0 + ld l, b + add hl, de + ld (hl), b + djnz state_init + ex de, hl + ld (hl), #0 + ex de, hl + ld l, #0 + ld h, #1 + add hl, de + ld (hl), #0 + inc hl + ld (hl), #0 + _endasm; +#else for (i = 0; i < 256; i++) state->perm[i] = (uint8_t)i; state->index1 = 0; state->index2 = 0; +#endif /* Randomize the permutation using key data */ for (j = i = 0; i < 256; i++) { + uint8_t tmp; j += state->perm[i] + key[i % keylen]; - swap_bytes(&state->perm[i], &state->perm[j]); + tmp = state->perm[i]; + state->perm[i] = state->perm[j]; + state->perm[j] = tmp; + //swap_bytes(&state->perm[i], &state->perm[j]); } } 1.2 tv80/tests/rc4.h http://www.opencores.org/cvsweb.shtml/tv80/tests/rc4.h.diff?r1=1.1&r2=1.2 (In the diff below, changes in quantity of whitespace are not shown.) Index: rc4.h =================================================================== RCS file: /cvsroot/ghutchis/tv80/tests/rc4.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- rc4.h 30 Jun 2005 21:49:50 -0000 1.1 +++ rc4.h 29 Sep 2005 23:44:12 -0000 1.2 @@ -50,4 +50,3 @@ const uint8_t *inbuf, uint8_t *outbuf, int buflen); #endif - 1.1 tv80/tests/stdint.h http://www.opencores.org/cvsweb.shtml/tv80/tests/stdint.h?rev=1.1&content-type=text/x-cvsweb-markup Index: stdint.h =================================================================== // // Copyright (c) 2005 Guy Hutchison (ghutchis@o...) // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // #ifndef _STDINT_H #define _STDINT_H 1 // reduced version of stdint.h for Z80 typedef signed char int8_t; typedef int int16_t; typedef long int32_t; typedef unsigned char uint8_t; typedef unsigned int uint16_t; typedef unsigned long uint32_t; #endif

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.