hrvach / OraoPy

Orao emulator in Python
GNU General Public License v2.0
6 stars 6 forks source link

errors at start #1

Open emard opened 4 years ago

emard commented 4 years ago

HI!

seems that have small problems :)

$ python3 orao.py pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "orao.py", line 301, in cpu.step() File "orao.py", line 284, in step instruction, addressing, cycles = self._opcodes[opcode] KeyError: 255

I added 0xFF instruction as NOP, then it opened window with graphics terminal showing just a white screen but no boot. If I press any key then window closes and I get this error:

Traceback (most recent call last): File "orao.py", line 315, in for address, keycodes in cpu._kbd.iteritems(): AttributeError: 'dict' object has no attribute 'iteritems'

hrvach commented 4 years ago

This was written long time ago in the Python 2 era ... will try to check and port it to Py3 eventually ;) If you start it with Python 2 and pygame, it should work.

emard commented 4 years ago

Really python2 works :)

emard commented 4 years ago

Well it works to boot but won't load WAV file guest@brix4:/tmp/OraoPy$ python2 ./orao.py pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.html Assertion '*_head == _item' failed at pulsecore/pdispatch.c:238, function reply_info_free(). Aborting.

hrvach commented 4 years ago

FILENAME.WAV should be placed in the wav folder and you tried loading it with LMEM "FILENAME" ? That's how it knows which file to load. If you git cloned the repo, try LMEM "TETRIS" and see if it works ... The whole image mounting/loading should have been solved better, I agree. :-)

emard commented 4 years ago

Yes exactly I cloned and did LMEM "TETRIS" it found a file wav/TETRIS.WAV but aborted with above error if filename doesn't exist, it closes with different error like LMEM "ABC" IOError: [Errno 2] No such file or directory: 'wav/ABC.WAV'

hrvach commented 4 years ago

My pygame is 1.9.4 so maybe something broke in the meantime, but I've just tried it and it seems to work... on the other hand, you can try the javascript version at orao.hrvoje.org, there is a "save emulator state" link which enables you to download json with memory contents, registers and everything else ... :)

Screenshot_2020-04-29_23-38-52

emard commented 4 years ago

I tried it second time, now it didn't print error but is downloading TETRIS forever, no start.

hrvach commented 4 years ago

Does the cursor re-appear after a while? It will not autostart, you need to type LNK 2048 for it to run.

emard commented 4 years ago

AAAA...!!!

LNK 2048 IT WORX!!!

shokre commented 3 years ago

Please see shokre/OraoPy#1 regarding loading .WAV files