Close

The big loop

A project log for WICE-4M

Leap Electronics WICE-4M EPROM Emulator Reverse Engineered

forthnutterforthnutter 10/06/2020 at 13:300 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

Discussions