Close
0%
0%

WICE-4M

Leap Electronics WICE-4M EPROM Emulator Reverse Engineered

Similar projects worth following
Leap Electronics WICE-4M ROM an SRAM EMULATOR
Source files on bitbucket.

Specification:
* Emulate 8 bit and 16 bit ROM's.
* DB25 Parallel interface.

1. Start with getting a schematic
Follow those traces to find out where they go.
Almost completed
2. Reverse original software MSDOS based.
Used IDA to go through the executable.
3. Write software to work on Windows and Linux via USB to LPT port.
This has kind of gone down a different path.
Look at a small micro with USB to do most of work.

Make a device to communicate to the WICE-4M

wice.factor

Factor code for testing code on WICE Interface PCB

factor - 3.02 kB - 10/08/2020 at 23:05

Download

wice - Project.pdf

PDF of the first version, schematic that was drawn in DesignSpark

Adobe Portable Document Format - 488.28 kB - 09/21/2016 at 04:31

Preview
Download

  • 1 × Multi-meter Something with audible continuity testing would be handy
  • 1 × Schematic entry program

  • On the back-burner

    forthnutter09/25/2023 at 02:28 0 comments

    Yep things have slowed down on this project, I have been experimenting on other projects, maybe will post other projects later on.

    Will get back to this project soon.

  • No Change

    forthnutter08/14/2021 at 09:41 0 comments

    Yes still working on project, I have been concentrating mainly on he PC software. Will post more as time goes by.

  • I have need for speed

    forthnutter03/29/2021 at 05:48 0 comments

    Have been working on getting some routines I had running in spin to work in Propeller Assembly, So far so good, I basic read a byte write a byte, read and write a byte with increment. The speed is still not to my satisfaction as of yet. Might try to do 16 bit and 32 bit read and writes that will get some things moving.

  • Factorise or Factorize

    forthnutter10/08/2020 at 15:44 0 comments

    I have knocked up some code on my Linux Mint machine to communicate with the my WICE interface. So far all look good.

    But sorry folks, I did not use C code not even Assembly.

    I did it in factor, I have been using this language for 5 years now, I like its forthy-ness, interactive interface and the library of functions.


    First I need open serial, this took some time work, how to do this on linux environment. I use library "io.serial" use "termios" and "streams" libraries. I had some issue on read operation, transmission was the easiest, only thing to remember is use the "flush" function to send the data out after "write" function.

    : wice-start ( -- )
      "/dev/ttyUSB0" 115200 <serial-port>
      [
        break
        wice-ack drop
        wice-status drop
        wice-reset drop
        wice-read-memory drop
        wice-read-minc drop
        wice-read-saddress drop
        wice-close drop
        0 wice-open drop
        wice-reset drop
        0 wice-write-memory drop
        wice-reset drop
        0x55 wice-write-minc drop
    
        wice-read-u30 drop
        wice-read-u4 drop
        wice-read-u5 drop
        wice-read-u6 drop
    
        wice-reset drop
        16 wice-dump drop
    
      ] with-serial-port-fix ;

    wice-start basically sets up a serial port tuple. The with-serial-port-fix opens the serial port into a stream namespace and then executes all function in the quotation [ ] .

    : with-serial-port-fix ( serial-port quot -- )
        break
        [ open-serial ] dip
        [ [ serial-modify ] keep ] dip
      [ [ stream>> 10 seconds over set-timeout  drop ] keep ] dip
    !    [ [ stream>> dup in>> buffer>> 1 >>size drop drop ] keep ] dip
    !    [ [ dup serial-fd F_SETFL 0 fcntl drop drop ] keep ] dip
        [ stream>> ] dip
        with-stream ; inline

    So in the quotation I run some function like wice-ack. Which sends out $00 on the serial port and read 1 byte back, does a test to see if it is zero.

    ! acknowlge the device
    : wice-ack ( -- ? )
      0 1byte-array write flush
      1 read-partial ?first 0 = ;

    I test each command  and then I do a memory read function of 16 bytes x 16 lines.

    ! read memory addressed by address counter and increment
    : wice-read-minc ( -- d )
      4 1byte-array write flush
      1 read-partial ;
    
    ! dump one inline
    : wice-read-marray ( n -- array )
      <byte-array>
      [
        drop
        wice-read-minc first
      ] map ;
    
    : wice-dump ( n -- array )
      f <array>
      [
        drop
        16 wice-read-marray
      ] map ;
    

    The result in an array of 16 byte arrays read from the WICE all values are in decimal, next I will do print that out as hex dump. Then I will try to do write array to memory.

    So far factor has made testing very easy.

  • The big loop

    forthnutter10/06/2020 at 13:30 0 comments

    Built a big loop that looks for the first data on serial port. This is the command byte, each command is put through case statement to run a function. Some commands will wait for 1 to 4 bytes for parameters. All commands must return something, this could  be 1 to 4 bytes of data this may change if future.

    List of current commands 

    Name                               
    Command code               
    Parameter                        
    Return Value    
    Description
    NOP$00
    None1 byte
    Awake Command will always return $00 manly here to see we get some kind of response.
    STATUS
    $01None1 byte
    Get status so far we $01 port A is open and $02 port B open for reading and writing.
    RESET$02None
    4 bytesReset the Address Counter. This should always return four $00 bytes 32 bits
    READ$03None1 byte
    Reads the data in memory at the address of counter
    READINC$04None1 byte
    Reads the data in memory at the address of counter then increment address counter.
    ADDRESS$05None4 bytes
    Get the current address from the counter shadow 32 bits
    OPEN$061 byte
    1 byte
    $01 Open port A for reading and writing, $02 open port B for reading writing. Returns the status e.g. command $01
    CLOSE$07None1 byte
    Closes access to all port and goes into ROM Emulation mode.
    WRITE$081 byte
    1 byteWrite to memory addressed by counter, a read of memory is performed after write and read data is returned.
    WRITEINC$091 byte
    1 byteWrite to memory addressed by counter, read of memory after write is returned and address counter is incremented.
    READU30$0ANone1 byte
    Get the shadow value of U30 latch output
    READU4$0BNone1 byte
    Get the shadow value of U4 latch output
    READU5$0CNone1 byte
    Get the shadow value of U5 latch output
    READU6$0DNone1 byte
    Get the shadow value of U6 latch output
    WRITEU30$0E1 byte
    1 byte
    Write a value to U30 shadow latch and return the new shadow value
    WRITEU4$0F1 byte
    1 byte
    Write a value to U4 shadow latch and return the new shadow value.
    WRITEU5$101 byte
    1 byte
    Write a value to U5 shadow latch and return the new shadow value
    WRITEU6$111 byte
    1 byte
    Write a value to U6 shadow latch and return the new shadow value

  • Firmware gone back to spin code

    forthnutter09/28/2020 at 13:28 0 comments

    I was working way with c code "simple IDE" for the propeller and notice the memory space was getting smaller and smaller until I ran out, I must of had optimise setting wrong. I did spend sometime trying work out what when wrong.

    I when back to my original spin code. I will get back the c code another time.

    I have build basically a spin driver to handle all parallel hardware signals, created "wice" driver handle control of the parallel driver.

    The wice driver handles the writing to latches and the reading and writing of wice memory and maintains a shadow memory of all the latches and the address counter.

    So far the main code is only utilising one processor and no assembly. Another processor is running serial communication.

    Will look at putting parallel driver into a separate processor to get some extra speed. 

  • Firmware Firmware

    forthnutter01/01/2020 at 08:39 0 comments

    Have been working on the firm for the Propeller, I started out using spin code for basic testing of I/O all looks good.

    Decided to build code in C using Simple IDE.

    So far I am able to write to WICE-4M memory and Read it back ok.

    More work required to transfer data from PC to Propeller and WICE-4M.

  • The New PCB

    forthnutter10/24/2019 at 15:11 1 comment

    This is the new Parallel PCB all the level shifters have been changed for better drive of TTL IC for WICE-4M. So far all looks good no issue with talking to WICE-4M. Now time to write code to start communication. 

  • The Parallel Redesign

    forthnutter10/08/2019 at 12:47 0 comments

    The Parallel port has now been redesign, getting made right now.

    Used level shifters with a extra output current.

    • Data line I used SN74LVC4245
    • The signal lines use 74LVC2T45 and 74LVC1T45

    This should work a bit better than last buld

  • That did not work very well

    forthnutter09/27/2019 at 22:56 1 comment

    I did not do much research on the TXB0108 series of level shifters, the output pins do not have enough drive to switch a Parallel port with pull up resistors with 1K on the WICE, My bad, a redesign is on the way.

View all 33 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates