pdewacht / oberon-risc-emu

Emulator for the Oberon RISC machine
273 stars 51 forks source link

Empty screen on Mac #9

Closed eterps closed 6 years ago

eterps commented 6 years ago

I did the following:

brew install sdl2
make
./risc Oberon-2016-08-02.dsk

I get an empty window:

https://i.imgur.com/hqBzTn5.png

I see some pixels at the bottom-left of the screen though.

pdewacht commented 6 years ago

Weird. That's not supposed to happen. Try compiling without optimization:

make clean
make CFLAGS=""
eterps commented 6 years ago

No, that doesn't make any difference.

eterps commented 6 years ago

Just let me know if you want me to printf some values in the code. I tried to find out where the problem could be, but I am not familiar enough with the code yet to locate the problem.

pdewacht commented 6 years ago

I guess you should first check that your disk image is intact (even though git should take care of that):

$ sha1sum Oberon-2016-08-02.dsk
b43b2e582ed3437ddb7af0b8870d557118d1170c  Oberon-2016-08-02.dsk

Next try with a different C compiler, if you have one available. (People have compiled this software on OS X, but I don't think they used homebrew.)

If you want to try debugging, you can apply the attached patch to add execution logging. Try something like this to log the first million instructions executed:

./risc Oberon-2016-08-02.dsk | head -n 1000000 > executionlog-broken.txt

The boot process should be entirely deterministic on the emulator. I've attached a trace from my system. The first non-matching line should point to the problem.

executionlog.txt.gz executiontrace.diff.gz

eterps commented 6 years ago

Oh wow, I hadn't expected it, but my disk image was indeed incorrect. I must have broken it somehow. I tried again with a fresh checkout and it works. Thanks for providing the additional details!