NJU-ProjectN / nemu

NJU EMUlator, a full system x86/mips32/riscv32/riscv64 emulator for teaching
Other
858 stars 184 forks source link

make ARCH=native run mainargs=mario don't work #56

Closed x-7461destiny closed 1 year ago

x-7461destiny commented 1 year ago

When I first using make ARCH=native run mainargs=mario to test rom game

# Building fceux-run [native]
+ CXX src/emufile.cpp
# Building am-archive [native]
# Building klib-archive [native]
# Creating image [native]
+ LD -> build/fceux-native
/home/arutoria/ics2022/fceux-am/build/fceux-native
ROM is mario
Starting FCEUX 2.2.3-interim git...
Found ROM 'mario'
Loading ...

 PRG ROM:    2 x 16KiB
 CHR ROM:    1 x  8KiB
 ROM MD5:  0x8e3630186e35d477231bf8fd50e54cdd
 Mapper #:  0
 Mapper name: NROM
 Mirroring: Vertical
 Battery-backed: No
 Trained: No

Power on
Initializing video...
XDG_RUNTIME_DIR (/usr/lib/) is not owned by us (uid 1000), but by uid 0! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
XDG_RUNTIME_DIR (/usr/lib/) is not owned by us (uid 1000), but by uid 0! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)

then I add export XDG_RUNTIME_DIR=/home/arutoria/ics2022/fceux-am in ~/.bashrc (Frankly, I don't know what this is gonna do). Run again

..........
Mapper #:  0
 Mapper name: NROM
 Mirroring: Vertical
 Battery-backed: No
 Trained: No

Power on
Initializing video...
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_conca

I don't know what's problem is it, and steps is following the 2022 pa. Hoping to get some help.

Besides, testing the key program also with a problem: show `Try to press any key (uart or keyboard)... then rather pop up a window than appear

# Building amtest-run [native]
+ CC src/tests/hello.c
+ CC src/tests/devscan.c
+ AS src/tests/audio/audio-data.S
+ CC src/tests/audio.c
+ CC src/tests/keyboard.c
+ CC src/tests/intr.c
+ CC src/tests/mp.c
+ CC src/tests/vm.c
+ CC src/tests/video.c
+ CC src/tests/rtc.c
+ CC src/main.c
# Building am-archive [native]
# Building klib-archive [native]
# Creating image [native]
+ LD -> build/amtest-native
/home/arutoria/ics2022/am-kernels/tests/am-tests/build/amtest-native
Try to press any key (uart or keyboard)...
Authorization is required, but no Authorization protocol specified
sashimi-yzh commented 1 year ago

It seems that there is something wrong in your library or driver. We can not give further diagnosis for your case, since the problem is out of the scope of the code we provide. We suggest searching the Internet.

x-7461destiny commented 1 year ago

all right, I'll try again. I've been searching for days. qaq Thanks to doing only a little, if have no idea just start again from scratch.

sashimi-yzh commented 1 year ago

Another suggestion is trying to use virtual machine.