secret
Created

Some prelimnary drafts of DCPU devices for 0x10c

  • Download Gist
DCPU_devices.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350
Some DCPU devices specs
 
Note! These are only preliminary drafts! Subject to change without any notice!
 
My manifacturer ID is 0x5A52544E (ZRTN in ascii, which is just a shortening of Zarutian)
Please give me some ideas how I could backronym it to something in-game backstory plausable.
 
And I have many more in my draft file.
 
-Zarutian
 
Copyleft: Zarutian
License: Creative Commons BY-SA and use at your own risk. No warranty implied nor explicted.
E-mail: zarutian@gmail.com
OpenPGP fingerprint: C8AA DDDB A46B 9220 AEFD 1CF9 C054 B038 9607 B2EE
 
================================================================================
Super Capacitor Energy Storage
MANI-ID: 0x5A52544E
HW-ID: 0x53434553 (SCES in ascii)
version: 0x0001
when interupted in treats DCPU register A contents as command code, whose are:
0x0001 B C X Y -- returns status of the device
B is kilo Watt hours stored upper word
C is kilo Watt hours stored lower word
X is kilo Watts being fed into the device
Y is kilo Watts being drained from the device
0x0002 B C X -- interupt DCPU with message B when C,X kilo Watt hours have been stored/drained
0x0003 B -- allow/disallow the device being fed (0x0000=disallow/0xFFFF=allow)
0x0004 B -- allow/disallow the device being drained (0x0000=disallow/0xFFFF=allow)
Warning! Explodes violently if overloaded!
================================================================================
Relieable Power Routing Box
MANI-ID: 0x5A52544E
HW-ID: 0x52505242 (RPRB)
version: 0x0001
This device has 16 power connectors (four on each side besides top and bottom)
which can be hooked up to any device requiring or providing power, or other RPRBses.
Internally it is made up of 4x4 configurable connection cells that connect the connectors
on the edges to each other controled by the configurations of the cells.
Each port has its manual on/off switch.
On the top of the device is a 4x4 multicolour LED indicator display. One LED corrisponding to
a cell. On the right side of that are six buttons.
when interupted in treats DCPU register A contents as command code, whose are:
0x0001 B C X -- get the current power flowing through conductor B
C is the upper word of the the watts number
X is the lower word of the the watts number
The watts number is signed (2's compl). Positive means the connector is pushing
power into the box while negative means that the connector is pull power out of the box.
0x0002 B C X Y Z -- highmark interupt set&enabled (current power of conductor B is higher than C..X )
0x0003 B C X Y Z -- lowmark interupt set&enabled (current power of conductor B is lower than C..X )
If a mark is crossed then cell Y is reconfigured (see below) and DCPU interupted
with interupt message Z if Z is not 0x0000.
0x0004 B C X Y Z -- get highmark interupt info
0x0005 B C X Y Z -- get lowmark interupt info
0x0006 B -- get configuration of cell B
0x0007 B -- set configuration of cell B
B is both the configuration and cell identifier and is as follows:
6 (Right most bit is bit 0, counts towards left)
| Bit 0 corrisponds to 0 on the diagram to the left
+-0-+-1-+ Bit 1 - || - || - || 1 || - || - || - || - || -
| 2 | Bit 2 - || - || - || 2 || - || - || - || - || -
-9-+-3-/---+-7- Bit 3 - || - || - || 3 || - || - || - || - || -
| | | Bit 4 - || - || - || 4 || - || - || - || - || -
+-4-+-5-+ Bit 5 - || - || - || 5 || - || - || - || - || -
| Bit 6 - || - || - || 6 || - || - || - || - || -
8 Bit 7 - || - || - || 7 || - || - || - || - || -
Bit 8 - || - || - || 8 || - || - || - || - || -
Bit 9 - || - || - || 9 || - || - || - || - || -
Bits B+A is the LED indicator code
00 LED turned off
01 LED is red
10 LED is green
11 LED is blue
Bits F+E+D+C selects the cell in question
0x0008 B C X Y Z I -- get buttons configurations
0x0009 B C X Y Z I -- set buttons configurations
B is the configuration for the topmost one
C is the configuration for next in line
X is the configuration of the next in line
Y is the configuration of the next in line
Z is the configuration of the second to last one
I is the configuraiton of the last one
When a button is pressed then its configuration replaces configuration of that cell.
Conductors:
0x0000 - 1st external connector on northface
0x0001 - 2nd
0x0002 - 3rd
0x0003 - 4th
0x0004 - 1st external connector on eastface
0x0005 - 2nd
0x0006 - 3rd
0x0007 - 4th
0x0008 - 1st external connector on southface
0x0009 - 2nd
0x000A - 3rd
0x000B - 4th
0x000C - 1st external connector on westface
0x000D - 2nd
0x000E - 3rd
0x000F - 4th
================================================================================
Cheap Ion Drive Unit
MANI-ID: 0x5A52544E
HW-ID: 0x67494455 (CIDU in ascii)
version: 0x0001
 
Has one extra memory access port (see SVMM and PEMM)
when interupted in treats DCPU register A contents as command code, whose are:
0x0001 B C X -- change thrusts and angles of drive
0x0002 B C X -- get current thrusts and angles of drive
B is engine thrust in Newton meters. Unsigned
C is left/right rotation of nozzle (0 - 180 degrees in fixed point) Unsigned
X is up/down rotation of nozzle (0 - 180 degrees in fixed point) Unsigned
0x0003 B C X Y -- start thrust sequence
B is address in memory where start of thrust sequence is found
C is memory select (0x0000 = DCPU memory, 0x0001 = extra memory access port)
X is length of thrust sequnce in thrust change commands (4 words)
Y is DCPU interupt message when thrust sequence is done
thrust change command:
1st word: engine thrust in Newton meters, Unsigned.
2nd word: is left/rotation of nozzle (0 - 180 degrees in fixed point) Unsigned
3rd word: is up/down rotation of nozzle (0 - 180 degrees in fixed point) Unsigned
4th word: delay in millisec 'til next thrust change command
Do not overload! (That is, do not feed too much power to it.)
================================================================================
ForceShield Reinforcing Generator
MANI-ID: 0x5A52544E
HW-ID: 0x46535247 (FSRG in ascii)
Version: 0x0001
This device when placed against a bulkhead reinforces aforesaid bulkhead with energy.
That energy is drawn from the power input of the device, which can be hooked to the ships
generator(s), via RPRBs or direct power line linkage.
It has an extra memory access slot meant for SVMM or PEMM
When interupted it treats DCPU register A contents as command code, whose are:
0x0001 B C -- get current reinforcement frequency
0x0002 B C -- set current reinforcement frequency
0x0003 B C -- get current reinforcement amplitude
0x0004 B C -- set current reinforcement applitude
0x0005 B C -- get current reinforcement phase
0x0006 B C -- set current reinforcement phase
B is the upper word
C is the lower word
0x0007 B C X Y -- set reinforcement frequency pattern, upper word
0x0008 B C X Y -- set reinforcement frequency pattern, lower word
0x0009 B C X Y -- set reinforcement amplitude pattern, upper word
0x000A B C X Y -- set reinforcement amplitude pattern, lower word
0x000B B C X Y -- set reinforcement phase pattern, upper word
0x000C B C X Y -- set reinforcement pahse pattern, lower word
B is memory slot select (0x0000=DCPU mem, 0x0001=Extra mem slot)
C is the starting address of the pattern in that memory
X is the length of the pattern in words
Y is the DCPU interupt message when one scan through of the pattern is done
Uses the DCPU cpu clock/ticker/pulser to advance the patterns onwards
================================================================================
Distance Radar/Lidar Sensor
MANI-ID: 0x5A52544E
HW-ID: 0x44524C53 (DRLS in ascii)
version: 0x0001
has two extra memory access ports A and B
when interupted in treats DCPU register A contents as command code, whose are:
0x0001 Reset device
0x0002 B C X Y - configure scan pattern
B is starting address in memory
C is memory select (0x0000=DCPU memory, 0x0001=extra memory access port A, 0x0002=port B)
X is length of scan pattern in scan commands (4 words)
Y is the interupt DCPU message when one scan pattern is done
0x0003 B C X Y - configure scan data destination
B is starting address in memory
C is memory select (0x0000=DCPU memory, 0x0001=extra memory access port A, 0x0002=port B)
X is length of scan data in scan samples (4 words)
Y is the interupt DCPU message when one scan data block is done
0x0004 B start/stop scanning (start B=0xFFFF, stop B=0x0000)
scan command/sample:
1st word: rotation along mount
2nd word: azimuth
3rd word: pulse strength (transmit when command/return when sample)
4th word: delay in millisec
when scanning both scan pattern and scan data are repeated until scanning is turned off
================================================================================
Simple Inertia Guidance Sensor
MANI-ID: 0x5A52544E
HW-ID: 0x53494753 (SIGS in ascii)
version: 0x0001
has one extra memory access port meant for a SVMM or PEMM
when interupted in treats DCPU register A contents as command code, whose are:
0x0001 Reset device
0x0002 B C X Y Z I J read position and orientation
B is the signed distance along x axis in meters since last reset
C is the signed distance along y axis in meters since last reset
X is the signed distance along z axis in meters since last reset
Y is the signed x part of the orientation quaternion since last reset
Z is the signed y part of the orientation quaternion since last reset
I is the signed z part of the orientation quaternion since last reset
J is the w part of the orientation quaternion since last reset
0x0003 B C X Y Z I J read velocity and rotation
B is the signed speed along x axis in meters per second since last reset
C is the signed speed along y axis in meters per second since last reset
X is the signed speed along z axis in meters per second since last reset
Y is the signed x part of the rotation quaternion since last reset
Z is the signed y part of the rotation quaternion since last reset
I is the signed z part of the rotation quaternion since last reset
J is the w part of the rotation quaternion since last reset
the rotation quaternion is added to the orientation every second to get current attitude
0x0004 B C X Y Z configure streaming & interupt
B is DCPU interupt message used when one buffer is done (0x0000 disable streaming and interupt)
C is memory select (0x0000=DCPU memory or 0x0001=extra memory access port)
X is start address in attached memory
Y is buffer length in samples (each sample takes 16 words)
Z is sample rate (samples per minute)
Samples are of form:
1st word: the signed distance along x axis in meters since last reset
2nd word: the signed distance along y axis in meters since last reset
3rd word: the signed distance along z axis in meters since last reset
4th word: the signed speed along x axis in meters per second since last reset
5th word: the signed speed along y axis in meters per second since last reset
6th word: the signed speed along z axis in meters per second since last reset
7th word: the signed x part of the orientation quaternion since last reset
8th word: the signed y part of the orientation quaternion since last reset
9th word: the signed z part of the orientation quaternion since last reset
Ath word: the w part of the orientation quaternion since last reset
Bth word: the signed x part of the rotation quaternion since last reset
Cth word: the signed y part of the rotation quaternion since last reset
Dth word: the signed z part of the rotation quaternion since last reset
Eth word: the w part of the rotation quaternion since last reset
Fth word: the nr sample since last reset, upper word
10th word: the nr sample since last reset, lower word
================================================================================
Simple Volatile Memory Module
MANI-ID: 0x5A52544E
HW-ID: 0x53564D4D (SVMM in ascii)
version: 0x0002
The device is extra 64K words of memory for the DCPU.
It has four memory ports, one attaches to the DCPU the others three can be connected to
the extra memory port of other devices.
When interupted it treats the contents of DCPU register A as a command code, whose are:
0x0001 B C -- Read the word at address B in the device memory into C
0x0002 B C -- Write word C at address B into the device memory
0x0003 B C X Y -- Bulk transfer, asynchronus, device to DCPU
0x0004 B C X Y -- Bulk transfer, asynchronus, DCPU to device
B is starting address in the device memory
C is starting address in the DCPU memory
X is the number of words being transfered
Y is the interupt message when done
It takes X many cycles to move X many words, meanwhile the DCPU runs at full speed.
0x0005 B C X -- Bulk transfer, synchronus, device to DCPU
0x0006 B C X -- Bulk transfer, synchronus, DCPU to device
B is starting address in the device memory
C is starting address in the DCPU memory
X is the number of words being transfered
Halts the DCPU for X many cycles while the transfer takes place
 
Only one bulk transfer per device can be in progress at any given time.
================================================================================
Persistant Electronic Memory Module
MANI-ID: 0x5A52544E
HW-ID: 0x50454D4D (PEMM in ascii)
version: 0x0003
When the module recieves interupts from the DCPU it is attached to it expects
an operation code in the DCPU's register A.
The device, like the SVMM has three extra memory access ports compatible with devices that are
compatible with SVMM memory access ports.
The device keeps it memory contents even unpowered.
The device has 64K words of capacity.
Operation code
0x0001 B C - Read the contents of PEMM at address given in register B into register C
0x0002 B C - Write the contents of register into PEMM at address given in register B
0x0003 B C X Y -- Bulk transfer, device to DCPU
0x0004 B C X Y -- Bulk transfer, DCPU to device
B is starting address in the device memory
C is starting address in the DCPU memory
X is the number of words being transfered
Y is the interupt message when done
it takes X many cycles to move X many words, meanwhile the DCPU runs at full speed
0x0005 B C X -- Bulk transfer, synchronus, device to DCPU
0x0006 B C Y -- Bulk transfer, synchronus, DCPU to device
B is starting address in the device memory
C is starting address in the DCPU memory
X is the number of words being transfered
Halts the DCPU for X many cycles while the transfer takes place
0x0007 B -- Enable write protection
B is write protection key address in the modules memory
All writes and transfers to are ignored though the transfers still interupt the DCPU
when done.
0x0008 B -- Disable write protection
B is the key from above
only one bulk transfer per device can be in progress at any given time.
================================================================================
Firmware loader (Compatible)
MANI-ID: 0x00000000
HW-ID: 0x46574C44 (FWLD in ascii)
version: 0x0001
This device is a small externally reprogrammble flash memory module intended to
keep boot up firmware.
when interupted, it treats DCPU register A contents as command code which is:
0x0000 B -- copy firmware contents to DCPU memory starting at address B
halts the DCPU for 512 cycles meanwhile.
These are rather cheap an plentiful (each DCPU should come with at least 5 spare)
When the DCPU is powered on it HWI the device at 0x0000 before it does anything else.
(See SirCmpwn's firmware proposal)
================================================================================
Firmware Programmer (Compatible)
MANI-ID: 0x00000000
HW-ID: 0x46575047 (FWPG in ascii)
version: 0x0001
This device takes an firmware loader module in its programmer slot.
when interupted, it treats DCPU register A contents as command code, whose are:
0x0000 B -- copy the firmware loader module contents into DCPU memory at address B
halts the DCPU for 512 cycles meanwhile.
0x0001 B C -- read word at address B in firmware loader module memory into C
0x0002 B C -- write word C to address B in firmware loader module memory
Though it is possible to use this device as a pass through (if the device is at 0x0000)
to the FWLD it contains when booting the DCPU, it is not really recommended.
================================================================================
More to come!

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.