scarybeasts / beebjit Goto Github PK
View Code? Open in Web Editor NEWA very fast BBC Micro emulator.
License: Other
A very fast BBC Micro emulator.
License: Other
One of the command lines in EXAMPLES
is not working for me. I enter:
./beebjit -swram d -rom d roms/E00DFS090 -fast -opt sound:off -0 test/perf/pi.ssd -log perf:speed
and it sits at the BASIC prompt with no FS banner. Shift+F12 tries to boot from RFS.
Slot 13 is writeable but the MOS is not finding firmware there (?&02AE = 0
), and the ROM service entry point is never called because there are no service ROMs:
$ ./beebjit -swram d -rom d roms/E00DFS090 -fast -opt sound:off -0 test/perf/pi.ssd -log perf:speed -debug
info:audio:Windows timing capabilities min 1 max 1000000
info:perf:inturbo opcode $00 excessive len 139
info:perf:inturbo opcode $40 excessive len 137
[ITRP] D9CD: LDA #$40 [A=AA X=00 Y=00 S=FD F= ZI 1 ]
(6502db) b 8000
(6502db) b 8003
(6502db) c
unimplemented:misc:write of TUBE region
breakpoint 0 hit 1 times
[8000] 8000: CMP #$01 [A=01 X=00 Y=0E S=FF F= ZI 1 ]
(6502db) m 02a0
02A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 60 00 00 .............`..
02B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
02C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF ................
02D0: FF FF FF 00 00 00 00 FF FF FF FF FF FF FF FF FF ................
(6502db) m 0df0
0DF0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0E00: FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0E10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0E20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
(6502db)
Using the beebjit_win_0.9.8 build (from a MinGW shell) plus a copy of test/
.
Building on a 64-bit Raspberry Pi yields the following errors:
$ ./build.sh
In file included from asm/asm_inturbo.c:4:
asm/arm64/asm_inturbo_arm64.c:309:1: error: redefinition of 'asm_emit_inturbo_call_interp'
asm_emit_inturbo_call_interp(struct util_buffer* p_buf) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
asm/arm64/asm_inturbo_arm64.c:300:1: note: previous definition of 'asm_emit_inturbo_call_interp' was here
asm_emit_inturbo_call_interp(struct util_buffer* p_buf) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: error: unrecognized command line option '-Wno-address-of-packed-member' [-Werro]
cc1: error: unrecognized command line option '-Wno-unknown-warning-option' [-Werror]
cc1: all warnings being treated as errors
In file included from asm/asm_jit.c:4:
asm/null/asm_jit_null.c:45:1: error: conflicting types for 'asm_emit_jit_call_inturb'
asm_emit_jit_call_inturbo(struct util_buffer* p_buf) {
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from asm/null/asm_jit_null.c:1,
from asm/asm_jit.c:4:
asm/null/../asm_jit.h:18:6: note: previous declaration of 'asm_emit_jit_call_inturbo' was here
void asm_emit_jit_call_inturbo(struct util_buffer* p_buf, uint16_t addr);
^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: error: unrecognized command line option '-Wno-address-of-packed-member' [-Werro]
cc1: error: unrecognized command line option '-Wno-unknown-warning-option' [-Werror]
cc1: all warnings being treated as errors
I'm still trying to work out if this is a problem because of being on 64-bit ARM or if it is something else such as an issue with GCC.
BTW, amazing project! I've toyed with it a bit on x86 and it's wonderful.
With this disc: https://bitshifters.github.io/content/tyb-enjoy.ssd it sounds mostly like noise. I ran it with:
./beebjit -disc ~/dev/personal/jsbeeb/discs/sound.ssd
with and without -mode interp
.
Richard Russell notes here — https://stardot.org.uk/forums/viewtopic.php?f=2&t=19819&start=30#p276764 — that the version 2 benchmark included here might not be ideal for running on anything but real 6502s, and provides updated code
Added separated/contiguous graphics state test. (See tom-seddon/b2#164)
Added hold graphics + text height non-change test. (Related to tom-seddon/b2#101)
Relevant b2 commits: tom-seddon/b2@c16ac91, tom-seddon/b2@64a0d02
I've pasted the listing in below, as tokenized BBC BASIC is a bit of pain to work with...
--Tom
10REM>TELETST
20 MODE 7
30 PRINT TAB(36,0)"V1.3"TAB(0,1);
40 PRINT "SEPARATED GLYPH SHOULD NOT TOUCH BLOCK"
50 PRINT CHR$(&91) + CHR$(&9E) + CHR$(&FF) + CHR$(&9A) + CHR$(&FF)
60 PRINT "FOREGROUND COLOR IS SET-AFTER"
70 PRINT CHR$(&92) + CHR$(&9E) + CHR$(&FF) + CHR$(&93) + CHR$(&94)
80 PRINT "BG->FG IS SET-AT"
90 PRINT CHR$(&94) + CHR$(&9D) + CHR$(&95) + CHR$(&9E) + CHR$(&FF) + CHR$(&98)
100 PRINT "ASCII DOES NOT AFFECT HELD CHARACTER"
110 PRINT CHR$(&96) + CHR$(&9E) + CHR$(&FF) + CHR$(&41) + CHR$(&96)
120 PRINT "HOLD ON SET-AT, HOLD OFF SET-AFTER"
130 PRINT CHR$(&97) + CHR$(&FF) + CHR$(&9E) + CHR$(&9F) + CHR$(&9F)
140 PRINT "CLEAR HELD CHARACTER #1"
150 PRINT CHR$(&91) + CHR$(&FF) + CHR$(&9E) + CHR$(&81) + CHR$(&81)
160 PRINT "CLEAR HELD CHARACTER #2"
170 PRINT CHR$(&92) + CHR$(&FF) + CHR$(&92) + CHR$(&9E)
180 PRINT "CLEAR HELD CHARACTER #3"
190 VDU 141,149,255,158,141,140,149,255,158,140,141
200 PRINT'
220 PRINT "MISSING SECOND DOUBLE"
230 PRINT CHR$(&93) + CHR$(&9A) + CHR$(&8D) + CHR$(&FF)
240 PRINT CHR$(&93) + CHR$(&9A) + CHR$(&8C) + CHR$(&FF)
250 PRINT "GRAPHICS SEPARATED/CONTIGUOUS STATE"
251 VDU 151,255,135,255,153,255,154,255,151,255,135,255,151,255
260 PRINT TAB(0,0);
I was trying out video:no-deinterlace-teletext
. Mostly it seems very good, but the first two frames don't seem to be handled the same as the rest. The first frame seems to have only one interlace, then the second frame only the other. The rest have both interlaces combined.
To reproduce (this pokes a VDU command to disable the cursor into the keyboard buffer so there's no flashing cursor - the runes here are cut down from those bbcmicrobot uses):
$ perl -e 'print "V.279;0;0;0;0;\r"'> keys.bin
$ ./beebjit -fast -headless -accurate -opt video:paint-start-cycles=60680000,video:border-chars=0,video:no-deinterlace-teletext -frame-cycles 1 -max-frames 10 -cycles 69000000 -commands 'breakat 600000 ;c;loadmem keys.bin 03e0;writem 02e1 ef;c'
[ITRP] D9CF: STA $0D00 [A=40 X=00 Y=00 S=FD F= I 1 ] [addr=0D00 val=FF]
(6502db) breakat 600000 ;c;loadmem keys.bin 03e0;writem 02e1 ef;c
(6502db) c;loadmem keys.bin 03e0;writem 02e1 ef;c
[ITRP] DAE3: STY $FE30 [A=CF X=04 Y=08 S=FF F=C I 1 ] [addr=FE30 val=72]
(6502db) loadmem keys.bin 03e0;writem 02e1 ef;c
(6502db) writem 02e1 ef;c
(6502db) c
info:jit:JIT handled fault (log every 1k)
unimplemented:misc:write of TUBE region
$ sha1sum *.bgra
6f1517021191dc8c3c96e1e42170568bb88695fe beebjit_frame_0.bgra
ec92903804d65d56d363dab69d353150861c0af6 beebjit_frame_1.bgra
13027eecfe377f0e80d729cb1a41e3729ebe3126 beebjit_frame_2.bgra
13027eecfe377f0e80d729cb1a41e3729ebe3126 beebjit_frame_3.bgra
13027eecfe377f0e80d729cb1a41e3729ebe3126 beebjit_frame_4.bgra
13027eecfe377f0e80d729cb1a41e3729ebe3126 beebjit_frame_5.bgra
13027eecfe377f0e80d729cb1a41e3729ebe3126 beebjit_frame_6.bgra
13027eecfe377f0e80d729cb1a41e3729ebe3126 beebjit_frame_7.bgra
13027eecfe377f0e80d729cb1a41e3729ebe3126 beebjit_frame_8.bgra
13027eecfe377f0e80d729cb1a41e3729ebe3126 beebjit_frame_9.bgra
$ for x in 0 1 2 ; do ffmpeg -hide_banner -y -f rawvideo -pixel_format bgra -video_size 640x512 -i "beebjit_frame_$x.bgra" -vf "scale=1280:1024" "$x.png" ; done
Then open [012].png
in your image viewer of choice and compare.
When compiling beebjit, using build_opt.sh, compilation stops with the following from gcc:
n function ‘asm_tables_init’,
inlined from ‘asm_tables_init’ at asm/asm_tables.c:11:1,
inlined from ‘asm_abi_init’ at asm/asm_abi.c:31:3,
inlined from ‘cpu_driver_alloc’ at cpu_driver.c:171:3:
asm/asm_tables.c:34:14: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
34 | *p_dst++ = val;
| ^
asm/asm_tables.c:54:14: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
54 | *p_dst++ = val;
| ^
asm/asm_tables.c:63:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
63 | *p_dst++ = 0;
| ^
asm/asm_tables.c:64:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
64 | *p_dst++ = 0x40;
| ^
lto1: all warnings being treated as errors
lto-wrapper: fatal error: gcc returned 1 exit status
This is on commit 0e57664
If you press the home key the emulator locks up and crashes on Windows.
-opt video:border-chars=0
captures a MODE 7 screen offset one character cell to the right (so the right-hand column is chopped off and there's an extra blank column on the left). This changed when 6845 skew was implemented in b08d591.
The new behaviour is probably more true to real hardware, but not helpful if you're trying to capture screenshots or video. I ran into this with BBCMicroBot - I think the live bot must be using an old build of beebjit currently, but this is essentially a blocker for upgrading to a newer beebjit version.
I think it would make sense for video:border-chars
to adjust the captured area for this offset. I can probably attempt a patch if that's helpful and this would be an acceptable solution.
Running the tagged version v0.9.7, I notice that the left SHIFT key on the Mac doesn't act as shift. The right SHIFT key does work, but not the left.
I realise you know about this already, but it does seem like a bug nonetheless! Is it possible to map BBC caps lock to a different Mac key somewhere out of the way - I tend not to use it that much, unless playing Zalaga :-) I use left SHIFT all the time in comparison.
Using the debugger while editing a program would be easier if you could import a list of address labels like the one generated by beebasm -d. It would allow you to keep referring to the same place in the code even when the address changes.
It would be a useful feature if it was possible to either switch of the border around the main BBC Micro screen or be able to colour it a different colour. Helps with grabbing screenshots of just the BBC Micro screen or determining where a pixel is being written (is it on the edge of the screen)?
The self-test performed by build.sh fails at current HEAD:
horizon:~/preservation/emulation/BBC/beebjit/beebjit$ git checkout upstream/master
Note: checking out 'upstream/master'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 980db69 Extend HFE files correctly if tracks past the end are written.
horizon:~/preservation/emulation/BBC/beebjit/beebjit$ git show-ref HEAD
980db6905cf62b7c278bbabaef3de75dfaa53e96 refs/remotes/upstream/HEAD
horizon:~/preservation/emulation/BBC/beebjit/beebjit$ ./build.sh
bbc.c: In function ‘bbc_read_callback’:
bbc.c:521:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (!p_bbc->is_master) {
^
bbc.c:526:3: note: here
case (k_addr_tube + 0):
^~~~
bbc.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
cc1: warning: unrecognized command line option ‘-Wno-unknown-warning-option’
log.c: In function ‘log_do_log_va_list’:
log.c:105:28: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 254 [-Wformat-truncation=]
"%s:%s:%s\n",
^~
log.c:108:21:
msg);
~~~
log.c:103:12: note: ‘snprintf’ output 4 or more bytes (assuming 259) into a destination of size 256
(void) snprintf(msg2,
^~~~~~~~~~~~~~
sizeof(msg2),
~~~~~~~~~~~~~
"%s:%s:%s\n",
~~~~~~~~~~~~~
p_severity_str,
~~~~~~~~~~~~~~~
p_module_str,
~~~~~~~~~~~~~
msg);
~~~~
log.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
cc1: warning: unrecognized command line option ‘-Wno-unknown-warning-option’
bbc.c: In function ‘bbc_read_callback’:
bbc.c:521:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (!p_bbc->is_master) {
^
bbc.c:526:3: note: here
case (k_addr_tube + 0):
^~~~
bbc.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
cc1: warning: unrecognized command line option ‘-Wno-unknown-warning-option’
log.c: In function ‘log_do_log_va_list’:
log.c:105:28: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 254 [-Wformat-truncation=]
"%s:%s:%s\n",
^~
log.c:108:21:
msg);
~~~
log.c:103:12: note: ‘snprintf’ output 4 or more bytes (assuming 259) into a destination of size 256
(void) snprintf(msg2,
^~~~~~~~~~~~~~
sizeof(msg2),
~~~~~~~~~~~~~
"%s:%s:%s\n",
~~~~~~~~~~~~~
p_severity_str,
~~~~~~~~~~~~~~~
p_module_str,
~~~~~~~~~~~~~
msg);
~~~~
log.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
cc1: warning: unrecognized command line option ‘-Wno-unknown-warning-option’
Running built-in unit tests.
unusual:video:horizontal total: 7
unusual:video:vsync pulse width: 16
unusual:video:horizontal total: 1
unusual:video:horizontal total: 3
Running test.rom, JIT, fast.
info:audio:device: default, rate 48000, buffer 512, periods 4, period size 128
info:jit:JIT handled fault (log every 1k)
Segmentation fault (core dumped)
The coredump is in os_failt_bail
which is called from linux_sigsegv_handler
, called from this ode in bbc.c:
|1002 case (k_addr_tube + 0): │
│1003 case (k_addr_tube + 4): │
│1004 case (k_addr_tube + 8): │
│1005 case (k_addr_tube + 12): │
│1006 case (k_addr_tube + 16): │
│1007 case (k_addr_tube + 20): │
│1008 case (k_addr_tube + 24): │
│1009 case (k_addr_tube + 28): │
│1010 if (p_bbc->test_map_flag) { │
│1011 switch (addr) { │
│1012 case k_addr_tube: │
│1013 /* &FEE0: caush crash. */ │
>│1014 *((volatile uint8_t*) 0xdead) = '\x41'; │
│1015 break; │
│1016 case (k_addr_tube + 1): │
│1017 /* &FEE1: reset cycles count. */ │
│1018 state_6502_set_cycles(p_bbc->p_state_6502, 0); │
│1019 break;
Compiler version info:
horizon:~/preservation/emulation/BBC/beebjit/beebjit$ gcc --version
gcc (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
horizon:~/preservation/emulation/BBC/beebjit/beebjit$ uname -a
Linux horizon.spiral-arm.org 4.19.0-11-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64 GNU/Linux
I performed a git bisect
but some of the intermediate commits look like they might fail for other reasons (there's an assert(0) in there for example) but I attach the bisection log anyway.
beebjit-bisection-log.txt
FWIW I am using gcc 8.3.0 (my distribution's default GCC) and compilation warnings (which seem unrelated) cause compilation to bail. Since build.sh changes between commits I can't just hack on that directly, so I used the attached wrapper gcc script.
gcc.txt
I have a patch for fixing the warnings but that can just be a pull request.
jit_metadata.c:134:12: error: ‘ret_addr_6502’ may be used uninitialized [-Werror=maybe-uninitialized]
134 | uint16_t ret_addr_6502;
| ^
F10 Pause emulator (does in Windows anyway, which cause a problem with games like Elite f0 to launch, if you hit it a few times you eventual get to launch)
Alt+F Turbo on off
Alt+T rewind tape
Alt+0 Swap disc drive 0
Alt+1 Swap disc drive 1
Alt+R Restart
This seems to be related to #47 - at least git bisect
pins the blame on the same commit (1565081),
The tmp.gif
animation produced by these commands should be a fairly clean 3 second loop counting from 0 to 14 (and it was before that commit) but now it's mostly stuck on one frame with a brief glitch to some others:
$ ./build_headless_opt.sh
$ perl -e 'print "\r\0\n\x22\xeb2:\xf5\xe3A=0\xb814:\xf1;A:\xe3D=1\xb8360:\xed,:\xfd0\r\xff"'> tmp.bas
$ perl -e 'print "RUN\r"' > keys.bin
$ rm beebjit_frame_*
$ ./beebjit -fast -headless -cycles 43216000000 -opt video:paint-start-cycles=21600000000,video:border-chars=0 -frame-cycles 1 -max-frames 150 -exit-on-max-frames -commands 'breakat 725000;c;loadmem tmp.bas 1900;loadmem keys.bin 03e0;writem 02e1 e4;writem 0000 24;writem 0001 19;writem 0002 24;writem 0003 19;writem 0012 24;writem 0013 19;breakat 21608000000;c'
$ ffmpeg -hide_banner -loglevel panic -y -f image2 -r 50 -s 640x512 -pix_fmt bgra -vcodec rawvideo -i beebjit_frame_%d.bgra tmp.gif
(The program here is: 10MO.2:REP.F.A=0TO14:P.;A:F.D=1TO360:N.,:U.0
)
Neither my patch in #47 nor the cleaner fix you applied instead seems to make a difference in this case.
I would certainly find it useful if there was a call stack so I can see where a sub-routine has been invoked from in the code. Some are called in multiple places in the code. The stack is a mess most of the time so not that useful just to inspect it (variables written for caching etc) - but if it's possible to capture the calling location on JMP/JSR/Interrupts and remove on RTS/RTI etc and not too much work it'd set this significantly apart from other emulators for debugging.
Maybe with the state of the 6502 registers at the point of call too (slippery slope I know)? Guess it's a simple C array fixed to 256 entries no bigger than the stack that only holds JMP/JSR values and pops them when there's a return etc plus interrupts. Similar for registers.
Thank you!
If you are copying a long line of text (full width) with copy the cursor jumps to the beginning of the current like at column 39 instead of going to column 40.
Oh and see it also does that if you are just moving the cursor along it jumps to the beginning of the current line at column 39.
Copy works fine just the cursor is shown in the wrong place.
./build.sh
In file included from asm/asm_common.c:4:
asm/arm64/asm_common_arm64.c: In function ‘asm_copy’:
asm/arm64/asm_common_arm64.c:12:24: error: pointer of type ‘void *’ used in subtraction [-Werror=pointer-arith]
12 | size_t size = (p_end - p_start);
| ^
At top level:
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
In file included from asm/asm_jit.c:4:
asm/arm64/asm_jit_arm64.c: In function ‘asm_jit_start_code_updates’:
asm/arm64/asm_jit_arm64.c:227:20: error: pointer of type ‘void *’ used in arithmetic [-Werror=pointer-arith]
227 | p_end = (p_start + length);
| ^
asm/arm64/asm_jit_arm64.c:235:31: error: pointer of type ‘void *’ used in subtraction [-Werror=pointer-arith]
235 | pages_length = (p_pages_end - p_pages_start);
| ^
asm/arm64/asm_jit_arm64.c: In function ‘asm_jit_finish_code_updates’:
asm/arm64/asm_jit_arm64.c:256:59: error: pointer of type ‘void *’ used in arithmetic [-Werror=pointer-arith]
256 | __builtin___clear_cache(p_asm->p_start, (p_asm->p_start + p_asm->length));
| ^
At top level:
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
Raspberry Pi 5, 8 GB RAM, running Raspberry Pi OS 64-bit desktop (Debian 12 / aarch64)
gcc (Debian 12.2.0-14) 12.2.0
Curiously, the headless version (./build_headless_opt.sh
) does compile, but ./beebjit -0 test/perf/clocksp.ssd -fast -headless -terminal
only manages around 1024 MHz. I get a similarly low number on a Mac Mini M2Pro too.
Running Richard Russell's speed.bbc in owlet, it's fine, but in rocket mode it restarts the machine and then gets stuck.
I would like to achieve the same effect as the B-Em fix in this Stardot post which makes HDFS work in B-EM, but I can't see any way to set the state of the keyboard DIP switches in beebjit. I scanned the code, but I'm really not familiar with it.
My rationale here is that I want to use HDFS ROMs in beebjit with HFE disk images to be more confident that geometry guessing isn't a problem (which could be the case in B-EM with SSD images), but for this to work, I need to be able to get HDFS to work in beebjit.
Sometimes beebjit (Mac tagged version v0.9.7) fails to start, but trying again often works. Here is the output where I tried to run it once and it failed, but trying again then worked:
% ./beebjit -0 test/games/Disc108-FroggerRSCB.ssd
BAILING: mmap in wrong location (expected 0x1f000000, got 0x20000000), heap 0x511a30 binary 0x407880
% ./beebjit -0 test/games/Disc108-FroggerRSCB.ssd
info:audio:sub-period size 86 time 1791us
unimplemented:misc:write of TUBE region
makeUEF 2.4 is out it fixes the swapping parity bug only problem is emulators are written to fix the bug in software, beebjit & mame now will not load tape files that are created with makeUEF that use 8e1 8o1 parity now are broken in the emulator (beebem & B-em do not care as they do not look at the parity chunk, they ignores it), and guess it will also break PlayUEF.
I have made new UEF's (with MakeUEF 2.4) of all the known titles I have come across that use 8e1 8o1 parity on a google drive. https://drive.google.com/drive/folders/1FXKW4NOKuOC4yf6-W8IoqtxIkrxC2PpL?usp=share_link
The errant frame appears to be offset slightly.
Repro command line:
./beebjit -fast -headless -frames-dir ../frames/ -accurate -rom 7 roms/gxr.rom -opt video:paint-start-cycles=60680000,video:border-chars=0 -frame-cycles 1 -max-frames 150 -cycles 69000000 -commands 'breakat 725000;c;loadmem ../test.bas 1c00;loadmem ../keys.bin 3e0;writem 02e1 e4;writem 0000 7b;writem 0001 1e;writem 0002 7b;writem 0003 1e;writem 0012 7b;writem 0013 1e;c'
Required files attached.
Just cloned the repo now, and unable to run beebjit. The build succeeds, so I have no idea if the output from build is helpful, but I've included it since running the test is a part of the build and my issue is at the end of it:
$ ./build.sh
Running built-in unit tests.
unusual:video:horizontal total: 7
unusual:video:vsync pulse width: 16
unusual:video:horizontal total: 1
unusual:video:horizontal total: 3
Running test.rom, JIT, fast.
BAILING: snd_pcm_hw_params_set_periods failed
Other applications output sound normally - as examples: firefox, mpv, sdlmame. I suspect the soundcard is being opened with some parameter that it doesn't like (for example my sound device doesn't support the number of buffers or the buffer size you're trying to use). I tried changing the buffer size up top in os_sound_linux.c to 1024 or 512 just to see if it would help; it didn't.
Pulseaudio isn't getting in the way as I haven't got it installed. Since the other applications work I don't think they're blocking the device. I'm not experienced enough with ALSA to work further through the ALSA code. Let me know what you want to try.
On a Fedora 31 box, if I press Alt-Tab to switch from the BBC Micro window to another window, when I switch back to the BBC Micro window the keyboard input no longer works. Problem reproduced when running beebjit
with no parameters and trying to type at the BASIC prompt before and after the Alt-Tab.
There is no problem if I use the mouse to switch from the BBC Micro window to another window, and then Alt-Tab back to the BBC Micro window. So it seems using Alt-Tab to switch out of the window is what's causing the problem.
If this cannot be fixed, then perhaps it can be documented as a limitation (i.e. just tell everyone to use the mouse and not the keyboard when switching to another window)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.