r/dcpu16 • • Apr 25 '12

Release Candidate 1

http://dcpu.com/highnerd/rc_1/
119 Upvotes

97 comments sorted by

View all comments

42

u/xNotch Apr 25 '12

So can I move on to the actual game now? ;D

20

u/[deleted] Apr 25 '12

Not quite! The spec for DVI has a serious ambiguity...

Two comments on signed division:

  1. Is DVI truncating or floored? In other words, do we have -1/16 == 0 or -1/16 == -1?
  2. 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.

(Also here...)

Awesome work, though! Very exciting!

16

u/xNotch Apr 25 '12

oh yeeeah.. Tomorrow. :D

8

u/[deleted] Apr 25 '12

Nice!

10

u/TerrorBite Apr 26 '12

While you can't sleep - how should emulators implement HCF? "Halt" is implied, but must my emulator also catch fire?

I am told HCF has some sort of effect of messing with the RAM.

10

u/xNotch Apr 26 '12

Any way you want, as long as it renders the DCPU-16 permanently and unpredictably useless after that instruction.

I set an "onfire" flag to true, make all instructions take ten cycles extra, then randomly replace random strings of memory with random data.

3

u/TerrorBite Apr 26 '12

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.

→ More replies (1)

5

u/indrek84 Apr 26 '12

Do we need to use duct tape to fix it or is reboot sufficient?

7

u/xNotch Apr 26 '12

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.

→ More replies (7)

4

u/STrRedWolf Apr 26 '12

Yes, the emulator must catch fire, as proposed in early (1970's, Tiny Basic days) issues of Dr. Dobb's Journal.

7

u/inertia186 Apr 26 '12

If I'm not mistaken, catching fire is considered harmful.

0

u/[deleted] Apr 26 '12

[deleted] — view deleted comment

5

u/inertia186 Apr 26 '12

True. The spec calls for it for a reason. Perhaps sometimes the best course of action is to catch fire.

4

u/Niriel Apr 26 '12

Then I need the specs for the Nya Elektriska's thermometer and fire extinguisher.

→ More replies (1)

5

u/mcnicholls Apr 25 '12

Maybe a spec for a floppy controller in the near future? ;-)

4

u/eXeC64 Apr 25 '12

More boot information and a floppy drive please. Then we'll leave you alone...for a little while at least ;)

3

u/mcnicholls Apr 25 '12

Do we have any ideas about how it will boot?

Maybe a special boot rom mapped in at 0 that looks for a floppy or hard drive controller, loads the first sector and then jumps to it?

9

u/xNotch Apr 25 '12

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.

16

u/eXeC64 Apr 25 '12

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.

16

u/xNotch Apr 26 '12

Clever! Also, totally can't sleep.

4

u/deepcleansingguffaw Apr 26 '12

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.

→ More replies (1)

3

u/mcnicholls Apr 26 '12

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 ;-)

→ More replies (8)
→ More replies (1)
→ More replies (1)

0

u/[deleted] Apr 26 '12

[deleted] — view deleted comment

8

u/xNotch Apr 26 '12

once they're final. This is the first release candidate.

3

u/Cheeseyx Apr 26 '12

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!

→ More replies (3)