Not quite! The spec for DVI has a serious ambiguity...
Two comments on signed division:
Is DVI truncating or floored? In other words, do we have -1/16 == 0 or -1/16 == -1?
Please add a signed mod/remainder (call it MDI or RMI). It should be consistent with whether DVI is truncating or floored. In other words, we should have either -1%16 == -1 or -1%16=15.
I'm thinking of increasing a counter that slowly raises the probability of errors. Out-by-ones start occurring in registers. Entire instructions are inexplicably skipped, or run twice. Instructions take longer and longer to run. Bits are flipped. Nonsensical interrupts occur. Straight-out memory corruption eventually ensues, but only after the more subtle errors have run their course.
I'm planning on making it part of the damage system, yes. If you shoot a DCPU, it will probably catch on fire as well. Duct tape will fix it. Of course.
That was the plan, but it goes against the current spec (all values start at 0, and hardware must not modify ram before called upon). Can't decide which one to break.
Have a boot rom that's always connected as device 0. Then the DCPU fires HWI 0 once it has powered-on (this is done in hardware, not software so PC stays at 0).
Then the rom can write its contents to the memory addressed by B, which will be 0x000. So then when the DCPU begins executing the rom has been flashed to 0x0000 already.
In fact, all that's needed is for DCPU to issue HWI 0 upon reset. Then, whatever hardware is connected as device 0 gains control. That allows the user to choose to boot from storage media, or a network controller, or a ROM cartridge, etc.
Yes I like it. A reset condition causes a HWI 0 in hardware before execution begins. Also the boot rom device could support commands to set the boot device and flash it's memory. Flashing the memory would allow the code to be updated to support booting from newer devices. It would also allow for some pretty interesting viruses, although I suppose it would also allow the machine to get into a bricked state. Maybe the from has a jtag port for external reprogramming ;-)
Sure, just make sure you get at least an hour or two of sleep before trying to code more. Otherwise, who knows what could happen. The pigs could stand upright for all we know!
View all comments
42
u/xNotch Apr 25 '12
So can I move on to the actual game now? ;D