Coder Social home page Coder Social logo

tom-seddon / b2 Goto Github PK

View Code? Open in Web Editor NEW
111.0 8.0 12.0 25.54 MB

BBC Micro emulator for Windows, OS X, and Linux

CMake 0.59% Makefile 0.11% Roff 0.38% PLSQL 0.01% Assembly 11.29% Batchfile 0.01% HTML 27.64% CSS 0.22% C 4.95% Perl 0.07% Python 0.57% C++ 46.06% Objective-C++ 0.12% Hack 7.90% Vim Script 0.09%
bbc-micro

b2's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

b2's Issues

Sort out noc submodule

  • Add filter index query for Linux
  • Add filter index query for OS X - though this can wait until video output is done...
  • Always return UTF8 strings in Windows. Folder dialogs should be OK; file dialogs should use OPENFILENAMEW and so on, plus the utf8->wchar->utf8 code. (It's not quite clear what the right thing to do is here, because utf8 strings aren't automatically compatible with CreateFileA - but there are worse options than this)
  • Run OS X version through Instruments to check it isn't leaking memory
  • Create PR for all of the above, if upstream is game

Disappearing configuration sections

The config loading is data-driven, and the JSON data is recreated from scratch when saving. When loading a config that contains information about stuff missing from the build - e.g., debugger keyboard shortcuts when running an ordinary build, newer features when running an older build - that information disappears when the config is saved.

--Tom

clang-format

Easy with Visual Studio. Surely easy with Emacs. Just need to figure out how to make it work with Xcode... or maybe just write a script, and run that.

Then one monster diff and it'll all be over...

Ugly scaling on first startup

This is a bit similar to this issue raised on B-E-m: stardot/b-em#56

When I first start b2 the width of the horizontal lines of the font is not consistent as per this screenshot:

screenshot from 2018-04-09 15-06-15

It looks like this might be caused by the emulated BBC's screen being scaled down to fit in the window because if I expand the window vertically it resolves:

screenshot from 2018-04-09 15-07-15

As this seems to be peculiar to the vertical direction I wonder if you are, perhaps, calculating the initial; window size to allow 1:1 and then having some of the vertical space stolen by the menu?

Interesting, BTW, that you have taken the opposite approach to scaling from the one I took in the Allegro 5 port of B-Em. B-Em only every scales up - if you make the window too small it crops instead. b2 appears to only ever scale down.

b2 debug is not cmake debug

There's a few places where the debugger build of b2 is referred to as b2 (debug) or similar, but it's the cmake RelWithDebInfo build rather than the debug build. Needs a rebrand...

Fetching submodules fails (imgui_club)

Currently unable to completely fetch b2 (using macOS 10.13.5, git version 2.15.2 (Apple Git-101.1)). Checking out submodules is failing with the following error:

error: Server does not allow request for unadvertised object a2150407befe6cd68d3b479b5714ebc5f129252d
Fetched in submodule path 'submodules/imgui_club', but it did not contain a2150407befe6cd68d3b479b5714ebc5f129252d. Direct fetching of that commit failed.

Is this known breakage from a WIP change (there were no issues before the most recent commit), or has something gone wrong? Thanks!

Use unmodified dear imgui

The current b2 docking/tabbing UI is handled by an addon library for dear imgui.

Now that official dear imgui has docking/tabbing support, it is probably worth switching back, purely on the basis that the standard code will have more people using it. Also, support for additional native windows, which (if SDL-friendly) would be great.

Pulse audio dev headers missing causes unusual Linux startup problem

TL;DR - missing pulseaudio headers doesn't fail to build, but has unfortunate runtime issues.

--

Built from source (3730507) from the Linux instructions. Running the debug build pops up a "No such audio device" popup window and console output (after OKing) is:

~/d/b/b/d.linux (master|✔) 21.9s $ ./src/b2/b2
Gtk-Message: 21:25:55.968: Failed to load module "canberra-gtk-module"
b2 - BBC Micro B/B+/Master 128 emulator
failed to initialize audio: No such audio device

This is on Ubuntu 19.04.

A quick grep about makes it seem like SDL's audio is causing the issue, that SDL_OpenAudioDevice is unable to find a sound output. Sadly this is where my knowledge dries up, so I turned to Google:

https://stackoverflow.com/questions/10465202/initializing-sdl-mixer-gives-error-no-available-audio-device

suggests I don't have a /dev/dsp and that means I was missing headers for pulse audio.

Indeed...that's the case, I must have missed them during initial install. apt-get install libpulse-dev and re-config...

and it works!

I guess this is a "please can the check for libpulse-dev fail if it's not present" feature request :)

Save state/event timeline rambles

(Random notes)

The current pervasive, always-on tree-style timeline is OK, but it's complex out of proportion to its actual usefulness. It tries too hard to make absolutely everything reproducible, which is unnecessary, the UI is a bit unclear, and its permanent presence makes write-through disc images and BeebLink (both of which would be useful) impossible to support. It could be disabled, whether manually or automatically - but because the user never expicitly enables it, that just feels like it would be confusing either way.

The timeline is there for three main purposes:

  1. creating videos of perfect game playthroughs (usable as-is)
  2. debugging a replay of something interesting that happened (WIP)
  3. some kind of auto cheat-finding UI (still in the pie-in-the-sky stage)

Case 1: always-on is unnecessary, and while a tree structure might be useful I don't think it's vital. Start recording at start of play, save at start of each level, go back to a previous state if you make a mistake - and it's OK if events after that point are then discarded, because that piece of the timeline wasn't useful.

Case 2: always-on might be useful, but it's not the end of the world if not. Tree structure unnecessary.

Case 3: always-on not appropriate, no tree structure.

So, probably:

  • Remove always-on. Don't save events by default. Saving states will always be possible - they're just snapshots - but the full-on event recording has to be activated explicitly
  • Remove the tree structure. The timeline is just a list of events, some of which might have saved states attached
  • Add specific UI to start/stop timeline recording. Then, since starting it requires user intervention, and it's hopefully obvious how to stop it, it's less of an issue if anything timeline-unfriendly is disabled while the recording is ongoing
  • Add specific UI, same panel perhaps, for timeline navigation and playback (frame scrubbing, save video, etc.)
  • Make timeline per-window. Cloning window should probably clone the timeline as it was at the time of cloning - that's probably fine
  • Save states should probably remain window-independent
  • Reduce the number of events that get saved to the timeline. Some stuff will be disabled while recording, some stuff might automatically restart the timeline

Not sure about the debug stuff though. You might not want any stuff disabled while debugging. So maybe the timeline could/should be restarted instead when problem operations are invoked? That could perhaps always make sense for changing model type or doing a hard reset, perhaps.

What about loading discs? Obviously mmap'd discs are no good, but a MemoryDiscImage is no problem. Store these events in the timeline, as currently? Disable disc insertion? Restart timeline - or should that one be a debug-only thing?

Hard-code test data paths

Having the test data paths passed in via the command line is fine for ctest, but mildly annoying for shell/Visual Studio/Xcode/etc.

It's OK for the tests to have the paths baked in. cmake knows the paths during the configure step, so it could pass them in as macros via -D.

Implement the XDG_DATA_DIRS search for assets

On Linux, if I install b2 in a typical executable dir, for example /usr/local/bin it expects to load assets from /usr/local/binb/assets/... which is not normal practice on Linux. As these are not executable assets whose binary representation would not vary according to the CPU architecture of the machine they would normally go in /usr/local/share/b2... As b2 uses the XDG specification to locate other files on Linux it should probably use the XDG_DATA_DIRS environment variable which is a colon-separated list of directories to search by appending the application name to each in turn, plus any sub-directorates and the filename under that. For example:

/home/user/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/

Fix new over-alignment

As seen building on Linux with g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0:

../../src/b2/BeebThread.cpp: In static member function ‘static std::shared_ptr<BeebThread> BeebThread::MakeShared(std::shared_ptr<MessageList>, uint32_t, int, size_t, BeebLoadedConfig, std::vector<BeebThread::TimelineEventList>)’:
../../src/b2/BeebThread.cpp:1633:180: warning: ‘new’ of type ‘BeebThread’ with extended alignment 64 [-Waligned-new=]
  auto p = new BeebThread(std::move(message_list), sound_device_id, sound_freq, sound_buffer_size_samples, std::move(default_loaded_config), std::move(initial_timeline_event_lists));
                                                                                                                                                                                    ^
../../src/b2/BeebThread.cpp:1633:180: note: uses ‘void* operator new(std::size_t)’, which does not have an alignment parameter
../../src/b2/BeebThread.cpp:1633:180: note: use ‘-faligned-new’ to enable C++17 over-aligned new support
../../src/b2/BeebThread.cpp: In member function ‘const BeebThread::DebugBigPage* BeebThread::GetDebugBigPageForAddress(M6502Word, M6502Word, uint32_t) const’:

Think this stems from the BeebThread having a OutputDataBuffer field, as that class has this:

#include <shared/pushwarn_padded_struct.h>
    alignas(64) std::atomic<uint64_t> m_wv{0};
#include <shared/popwarn.h>

But this doesn't have to actually be aligned - the alignment is to avoid false sharing between consumer and producer parts. A simple array of 64 bytes (i.e., std::hardware_destructive_interference_size, if this were C++17...), while a bit more wasteful, would create enough of a gap...

Extremely poor performance on windows

I've just tried the v0.0.4 prebuilt release version on windows7x64 on a Core2 Quad and although the emulated beeb seems to be running fine (~1X), the menu and screen updates are less than 1 fps.
The emulator takes over 30 seconds to start up, but only uses 3-5% CPU - it is using the DX renderer.

miniz warning

../submodules/miniz/miniz_zip.c:132:9: warning: Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files. [-W#pragma-messages]

#pragma message("Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files.")

I'm not sure large files are that important, but it would be nice to get rid of it. Is a #define missing somewhere, or something?

VS2019 warnings

There's a vast number of analyze warnings...

Should add SAL markup to b2 code to fix them.

Third-party libraries: open question! Check submodules and merge in upstream updates if this is fixed. Disable warnings if active projects haven't fixed it yet. Relacy looks rather un(der)maintained... might need some local patches?

NuLA Banding

I was just trying the SOTB NuLA demo in b2 and it doesn't look right to me. Compare the b2 and b-em screen shots.
2018-04-18-sotb-b-em
2018-04-18-sotb-b2

Cycle stretching

Update cycle stretching setup based on new test program results.

It's apparently different on B and Master, so check on B too...

RTC read

Data sheet:

During read cycles, DS signifies the time that the RTC is to drive the bidirectional bus. In write cycles, the trailing edge of DS causes the Real-Time Clock plus RAM to latch the written data

But b2 treats DS as a strobe in read mode:

AddressableLatch test;

disc drive noise is bogus

I don't think the seek time detection code works properly, and the step noise is always played back at the same pitch.

Upload all builds to web site

At the moment, interim Windows builds are hosted on AppVeyor, since it stores artefacts as part of the service. Interim OS X builds are simply discarded, because Travis CI seems to throw artefacts away.

Should really upload all interim builds to a web site, so they're easily retrieved. Probably just put them all in the same folder and let the server provide its FTP-style download interface...

(This will also make getting Windows builds a touch easier, as you won't have to click through all the various AppVeyor screens.)

--Tom

Hardware that isn't emulated yet (but should be)

  • 6502 second processor (anything non-6502 is out of scope, at least currently)
  • Serial port (to/from file/clipboard/socket/etc.)
  • Parallel port (ditto)
  • Joysticks
  • Speech
  • 8271
  • Other types of FDC?
  • Hard drive
  • Master Compact
  • Olivetti Prodest PC 128S (in theory, mostly the same as Master Compact)
  • ROM mappers (InterWord, Quest Paint, Master ROM, etc.)
  • Tapes
  • Mouse (I think the Watford and AMX ones work the same way? Is the Compact mouse the same kind of thing?)
  • Turbo 6502 second processor (see https://stardot.org.uk/forums/viewtopic.php?t=11366)

Docs: libglvnd-dev replaces libgles1-mesa-dev

Just done an install on Ubuntu 18.04. Worked perfectly but libgles1-mesa-dev seems to have been renamed in Ubuntu as libglvnd-dev, so you might need to update the Linux build instructions.

Add pictures to README.md

Just because I'm using the GitHub repo as the project's web site, that doesn't mean the readme necessarily has to be such an image-free wall of text...

Spy Hunter sound

Spy Hunter sounds wrong. Front end sound is wrong (too quiet - it only plays on 1 channel) and the in game music is atrocious.

Regarding the front end sound: it starts out setting DDRA to $ff:

  6177859  m`$37f7: sei                      A=0f X=ff Y=00 S=fb P=nvdIzC (D=a9)
  6177861  m`$37f8: lda #$ff                 A=ff X=ff Y=00 S=fb P=NvdIzC (D=ff)
  6177863  m`$37fa: sta $fe43 [i`$fe43]      A=ff X=ff Y=00 S=fb P=NvdIzC (D=ff)
  6177868  m`$37fd: lda #$81                 A=81 X=ff Y=00 S=fb P=NvdIzC (D=81)

Eventually it hits this bit in the OS:

  7468837  SystemVIA - Write ORB. Reset IFR CB2.
  7468838  o`$f02f: ldy #$7f                 A=20 X=00 Y=7f S=ea P=nvdIzc (D=7f)
  7468839  PORTB - PB = $F3 (%11110011): KB Read=false
  7468840  o`$f031: sty $fe43 [i`$fe43]      A=20 X=00 Y=7f S=ea P=nvdIzc (D=7f)
  7468846  o`$f034: stx $fe4f [i`$fe4f]      A=20 X=00 Y=7f S=ea P=nvdIzc (D=00)
  7468851  Port value now: 000 ($00) (%00000000) ('?')
  7468852  o`$f037: ldx $fe4f [i`$fe4f]      A=20 X=00 Y=7f S=ea P=nvdIZc (D=00)
  7468858  o`$f03a: rts                      A=20 X=00 Y=7f S=ec P=nvdIZc (D=f0)

DDRA is then stuck at $7f, making a big mess.

jsbeeb runs it OK...

Visual Studio 2017/2019

Update Windows compiler? VS2015 is a bit old...

Should really at least make sure it builds cleanly with VS2017 and VS2019.

Build failure on Linux

Attempting to build master from github (0.0.4-120-g699023b) fails with this error:

FAILED: src/b2/CMakeFiles/test_JobQueue.dir/JobQueue.cpp.o 
/usr/bin/c++  -D_GNU_SOURCE -I../src/shared/h -save-temps -O2 -g -DNDEBUG   -Wall -Wuninitialized -Winit-self -pedantic -Werror=implicit-function-declaration -Wsign-conversion -Wunused-result -Wno-overlength-strings -Wunused-parameter -std=gnu++14 -MD -MT src/b2/CMakeFiles/test_JobQueue.dir/JobQueue.cpp.o -MF src/b2/CMakeFiles/test_JobQueue.dir/JobQueue.cpp.o.d -o src/b2/CMakeFiles/test_JobQueue.dir/JobQueue.cpp.o -c ../src/b2/JobQueue.cpp
../src/b2/JobQueue.cpp: In member function ‘bool JobQueue::Init(unsigned int)’:
../src/b2/JobQueue.cpp:110:41: error: ‘bind’ is not a member of ‘std’
             td->thread=std::thread(std::bind(&JobQueue::ThreadFunc,this,td));
                                         ^~~~

There are also some compiler warnings:

../submodules/SDL/src/render/opengles/SDL_render_gles.c: In function ‘GLES_CreateRenderer’:
../submodules/SDL/src/render/opengles/SDL_render_gles.c:347:30: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
     renderer->RenderGeometry = GLES_RenderGeometry;
                              ^
[63/302] Building C object submodules/...ir/src/render/opengl/SDL_render_gl.c.o
../submodules/SDL/src/render/opengl/SDL_render_gl.c: In function ‘GL_CreateRenderer’:
../submodules/SDL/src/render/opengl/SDL_render_gl.c:528:34: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
         shading_language_version = data->glGetString(GL_SHADING_LANGUAGE_VERSION);
                                  ^
[64/302] Building C object submodules/.../render/opengles2/SDL_render_gles2.c.o
../submodules/SDL/src/render/opengles2/SDL_render_gles2.c: In function ‘GLES2_RenderGeometry’:
../submodules/SDL/src/render/opengles2/SDL_render_gles2.c:2071:13: warning: ‘sourceType’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         if (GLES2_SelectProgram(renderer, sourceType, GLES2_SHADER_VERTEX_GEOMETRY) < 0 )
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[181/302] Building CXX object src/shared/t/CMakeFiles/test_basic.dir/test_basic.cpp.o
../src/shared/t/test_basic.cpp: In function ‘int main()’:
../src/shared/t/test_basic.cpp:136:15: warning: ‘%zu’ directive output truncated writing 5 bytes into a region of size 3 [-Wformat-truncation=]
     n=snprintf(buf,sizeof buf,"%zu",value);
       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/shared/t/test_basic.cpp:136:15: note: ‘snprintf’ output 6 bytes into a destination of size 3
../src/shared/t/test_basic.cpp:206:5: warning: ‘%zx’ directive output truncated writing 4 bytes into a region of size 3 [-Wformat-truncation=]
 int main(void) {
     ^~~~
../src/shared/t/test_basic.cpp:144:13: note: ‘snprintf’ output 5 bytes into a destination of size 3
     snprintf(buf,sizeof buf,"%zx",value);
     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[204/302] Building CXX object experimental/test_dear_i...i/CMakeFiles/test_dear_imgui.dir/test_dear_imgui.cpp.o
In file included from ../submodules/imgui/./addons/imgui_user.h:130:0,
                 from ../submodules/imgui/imgui_user.h:9,
                 from ../submodules/imgui/imgui.h:1533,
                 from ../experimental/test_dear_imgui/test_dear_imgui.cpp:10:
../submodules/imgui/./addons/./imguitabwindow/imguitabwindow.h: In member function ‘void ImGui::TabWindow::TabLabel::setLabel(const char*, bool)’:
../submodules/imgui/./addons/./imguitabwindow/imguitabwindow.h:308:43: warning: conversion to ‘size_t {aka long unsigned int}’ from ‘int’ may change the sign of the result [-Wsign-conversion]
         label = (char*) ImGui::MemAlloc(sz+1);strcpy(label,lbl);
                                         ~~^~
In file included from ../submodules/imgui/./addons/imgui_user.h:130:0,
                 from ../submodules/imgui/imgui_user.h:9,
                 from ../submodules/imgui/imgui.h:1533,
                 from ../experimental/test_dear_imgui/test_dear_imgui.cpp:10:
../submodules/imgui/./addons/./imguitabwindow/imguitabwindow.h: In member function ‘void ImGui::TabWindow::TabLabel::setTooltip(const char*)’:
../submodules/imgui/./addons/./imguitabwindow/imguitabwindow.h:326:45: warning: conversion to ‘size_t {aka long unsigned int}’ from ‘int’ may change the sign of the result [-Wsign-conversion]
         tooltip = (char*) ImGui::MemAlloc(sz+1);strcpy(tooltip,tt);
                                           ~~^~
In file included from ../submodules/imgui/./addons/imgui_user.h:130:0,
                 from ../submodules/imgui/imgui_user.h:9,
                 from ../submodules/imgui/imgui.h:1533,
                 from ../experimental/test_dear_imgui/test_dear_imgui.cpp:10:
../submodules/imgui/./addons/./imguitabwindow/imguitabwindow.h: In member function ‘void ImGui::TabWindow::TabLabel::setUserText(const char*)’:
../submodules/imgui/./addons/./imguitabwindow/imguitabwindow.h:332:50: warning: conversion to ‘size_t {aka long unsigned int}’ from ‘int’ may change the sign of the result [-Wsign-conversion]
             userText = (char*) ImGui::MemAlloc(sz+1);strcpy(userText,_userText);
                                                ~~^~
In file included from ../submodules/imgui/./addons/imgui_user.h:181:0,
                 from ../submodules/imgui/imgui_user.h:9,
                 from ../submodules/imgui/imgui.h:1533,
                 from ../experimental/test_dear_imgui/test_dear_imgui.cpp:10:
../submodules/imgui/./addons/./imguitoolbar/imguitoolbar.h: In member function ‘size_t ImGui::Toolbar::getNumButtons() const’:
../submodules/imgui/./addons/./imguitoolbar/imguitoolbar.h:296:61: warning: conversion to ‘size_t {aka long unsigned int}’ from ‘int’ may change the sign of the result [-Wsign-conversion]
     inline size_t getNumButtons() const {return buttons.size();}
                                                 ~~~~~~~~~~~~^~
In file included from ../submodules/imgui/./addons/imgui_user.h:187:0,
                 from ../submodules/imgui/imgui_user.h:9,
                 from ../submodules/imgui/imgui.h:1533,
                 from ../experimental/test_dear_imgui/test_dear_imgui.cpp:10:
../submodules/imgui/./addons/./imguivariouscontrols/imguivariouscontrols.h: In static member function ‘static void ImGui::TreeViewNode::Data::SetString(char*&, const char*, bool)’:
../submodules/imgui/./addons/./imguivariouscontrols/imguivariouscontrols.h:539:54: warning: conversion to ‘size_t {aka long unsigned int}’ from ‘int’ may change the sign of the result [-Wsign-conversion]
                 destText = (char*) ImGui::MemAlloc(sz+1);strcpy(destText,text);
                                                    ~~^~
In file included from ../submodules/imgui/./addons/imgui_user.h:187:0,
                 from ../submodules/imgui/imgui_user.h:9,
                 from ../submodules/imgui/imgui.h:1533,
                 from ../experimental/test_dear_imgui/test_dear_imgui.cpp:10:
../submodules/imgui/./addons/./imguivariouscontrols/imguivariouscontrols.h: In member function ‘unsigned int ImGui::TreeViewNode::getMode() const’:
../submodules/imgui/./addons/./imguivariouscontrols/imguivariouscontrols.h:675:56: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
         if (m==MODE_NONE) m = MODE_INTERMEDIATE;return m;
                                                        ^
../experimental/test_dear_imgui/test_dear_imgui.cpp: In member function ‘bool Window::Init()’:
../experimental/test_dear_imgui/test_dear_imgui.cpp:248:9: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
     int rc;
         ^~
../experimental/test_dear_imgui/test_dear_imgui.cpp: In member function ‘void Window::RenderImGuiDrawData()’:
../experimental/test_dear_imgui/test_dear_imgui.cpp:460:9: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
     int rc;
         ^~
[206/302] Building CXX object src/6502/CMakeFiles/6502_gen.dir/6502_gen.cpp.o
../src/6502/6502_gen.cpp: In member function ‘void InstrGen::GeneratePhase1(const Cycle*) const’:
../src/6502/6502_gen.cpp:671:14: warning: variable ‘set_acarry’ set but not used [-Wunused-but-set-variable]
         bool set_acarry=false;
              ^~~~~~~~~~

SEGV after "Set as default" in master

I was flailing about like a fool trying to work out how to make it a Master128 from thecmd line. I found the Tools->Configurations. I clicked the "Copy" on the master128 by mistake, then clicked "set as default".

I re-ran and got a segv:

~/d/b/b/d.linux (master|✔) $ gdb --args ./src/b2/b2 -0 ~/dev/jsbeeb/discs/twister.ssd
GNU gdb (Ubuntu 8.2.91.20190405-0ubuntu3) 8.2.91.20190405-git
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./src/b2/b2...
(gdb) r
Starting program: /home/matthew/dev/b2/build/d.linux/src/b2/b2 -0 /home/matthew/dev/jsbeeb/discs/twister.ssd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff56b6700 (LWP 14969)]
[New Thread 0x7ffff4eb5700 (LWP 14970)]
[New Thread 0x7fffeec86700 (LWP 14971)]
[New Thread 0x7fffed8ff700 (LWP 14972)]
[New Thread 0x7fffed8be700 (LWP 14974)]
[New Thread 0x7fffed0bd700 (LWP 14975)]
[New Thread 0x7fffec8bc700 (LWP 14976)]
[New Thread 0x7fffb7fff700 (LWP 14977)]
[New Thread 0x7fffb77fe700 (LWP 14978)]
[New Thread 0x7fffb6ffd700 (LWP 14979)]
[New Thread 0x7fffb67fc700 (LWP 14980)]
[New Thread 0x7fffb5ffb700 (LWP 14981)]
[New Thread 0x7fffb57fa700 (LWP 14982)]
[New Thread 0x7fffb4ff9700 (LWP 14983)]
[New Thread 0x7fff97fff700 (LWP 14984)]
[New Thread 0x7fff977fe700 (LWP 14985)]
RTC...: Write $0A; 10; A: value now: 32; $20
RTC...: Write $0B; 11; B: value now: 2; $02

Thread 1 "b2" received signal SIGSEGV, Segmentation fault.
ConfigsUI::DoEditConfigGui (this=0x555556e888d0, config=0x555555edcf70, editable_config=0x555555edcf70) at ../../src/b2/ConfigsUI.cpp:181
181	            if(!editable_config->disc_interface->uses_1MHz_bus) {
(gdb) bt
#0  0x000055555564a3ee in ConfigsUI::DoEditConfigGui(BeebConfig const*, BeebConfig*) (this=0x555556e888d0, config=0x555555edcf70, editable_config=0x555555edcf70) at ../../src/b2/ConfigsUI.cpp:181
#1  0x0000555555649d56 in ConfigsUI::<lambda(const BeebConfig*, BeebConfig*)>::operator()(const BeebConfig *, BeebConfig *) const
    (__closure=0x7fffffffc2b0, config=0x555555edcf70, editable_config=0x555555edcf70) at ../../src/b2/ConfigsUI.cpp:54
#2  0x000055555564ac72 in std::_Function_handler<bool(const BeebConfig*, BeebConfig*), ConfigsUI::DoImGui(CommandContextStack*)::<lambda(const BeebConfig*, BeebConfig*)> >::_M_invoke(const std::_Any_data &, const BeebConfig *&&, BeebConfig *&&) (__functor=..., __args#0=@0x7fffffffc0f0: 0x555555edcf70, __args#1=@0x7fffffffc0e8: 0x555555edcf70) at /usr/include/c++/8/bits/std_function.h:282
#3  0x00005555555b2379 in std::function<bool (BeebConfig const*, BeebConfig*)>::operator()(BeebConfig const*, BeebConfig*) const (this=0x7fffffffc2b0, __args#0=0x555555edcf70, __args#1=0x555555edcf70)
    at /usr/include/c++/8/bits/std_function.h:687
#4  0x00005555555af37e in BeebWindows::<lambda(const BeebConfig*, const iterator&)>::operator()(const BeebConfig *, const std::vector<BeebConfig, std::allocator<BeebConfig> >::iterator &) const
    (__closure=0x7fffffffc250, config=0x555555edcf70, it=
  {name = "Master 128 (MOS 3.20) (2)", beeb_type = 2, os_file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/mos.rom", roms = {{file_name = "", writeable = false}, {file_name = "", writeable = false}, {file_name = "", writeable = false}, {file_name = "", writeable = false}, {file_name = "", writeable = true}, {file_name = "", writeable = true}, {file_name = "", writeable = true}, {file_name = "", writeable = true}, {file_name = "", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/dfs.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/viewsht.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/edit.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/basic4.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/adfs.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/view.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/terminal.rom", writeable = false}}, keyboard_links = 0 '\000', nvram_contents = std::vector of length 0, capacity 0, disc_interface = 0x0, video_nula = true, ext_mem = false}) at ../../src/b2/BeebWindows.cpp:534
#5  0x00005555555b0722 in std::_Function_handler<bool(const BeebConfig*, const __gnu_cxx::__normal_iterator<BeebConfig*, std::vector<BeebConfig, std::allocator<BeebConfig> > >&), BeebWindows::ForEachConfig(const std::function<bool(const BeebConfig*, BeebConfig*)>&)::<lambda(const BeebConfig*, const iterator&)> >::_M_invoke(const std::_Any_data &, const BeebConfig *&&, const __gnu_cxx::__normal_iterator<BeebConfig*, std::vector<BeebConfig, std::allocator<BeebConfig> > > &) (__functor=..., __args#0=@0x7fffffffc1c0: 0x555555edcf70, __args#1=
  {name = "Master 128 (MOS 3.20) (2)", beeb_type = 2, os_file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/mos.rom", roms = {{file_name = "", writeable = false}, {file_name = "", writeable = false}, {file_name = "", writeable = false}, {file_name = "", writeable = false}, {file_name = "", writeable = true}, {file_name = "", writeable = true}, {file_name = "", writeable = true}, {file_name = "", writeable = true}, {file_name = "", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/dfs.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/viewsht.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/edit.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/basic4.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/adfs.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/view.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/terminal.rom", writeable = false}}, keyboard_links = 0 '\000', nvram_contents = std::vector of length 0, capacity 0, disc_interface = 0x0, video_nula = true, ext_mem = false}) at /usr/include/c++/8/bits/std_function.h:282
#6  0x00005555555b163d in std::function<bool (BeebConfig const*, __gnu_cxx::__normal_iterator<BeebConfig*, std::vector<BeebConfig, std::allocator<BeebConfig> > > const&)>::operator()(BeebConfig const*, __gnu_cxx::__normal_iterator<BeebConfig*, std::vector<BeebConfig, std::allocator<BeebConfig> > > const&) const (this=0x7fffffffc250, __args#0=0x555555edcf70, __args#1=
  {name = "Master 128 (MOS 3.20) (2)", beeb_type = 2, os_file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/mos.rom", roms = {{file_name = "", writeable = false}, {file_name = "", writeable = false}, {file_name = "", writeable = false}, {file_name = "", writeable = false}, {file_name = "", writeable = true}, {file_name = "", writeable = true}, {file_name = "", writeable = true}, {file_name = "", writeable = true}, {file_name = "", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/dfs.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/viewsht.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/edit.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/basic4.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/adfs.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/view.rom", writeable = false}, {file_name = "/home/matthew/dev/b2/build/d.linux/src/b2/assets/roms/m128/3.20/terminal.rom", writeable = false}}, keyboard_links = 0 '\000', nvram_contents = std::vector of length 0, capacity 0, disc_interface = 0x0, video_nula = true, ext_mem = false}) at /usr/include/c++/8/bits/std_function.h:687
#7  0x00005555555ad912 in ForEachBeebConfig(const std::function<bool(const BeebConfig*, const __gnu_cxx::__normal_iterator<BeebConfig*, std::vector<BeebConfig, std::allocator<BeebConfig> > >&)> &) (fun=...)
    at ../../src/b2/BeebWindows.cpp:111
#8  0x00005555555af3f4 in BeebWindows::ForEachConfig(std::function<bool (BeebConfig const*, BeebConfig*)> const&) (fun=...) at ../../src/b2/BeebWindows.cpp:531
#9  0x0000555555649d97 in ConfigsUI::DoImGui(CommandContextStack*) (this=0x555556e888d0, cc_stack=0x555555f05d28) at ../../src/b2/ConfigsUI.cpp:53
#10 0x00005555555f8e1d in BeebWindow::DoSettingsUI() (this=0x555555f051b0) at ../../src/b2/BeebWindow.cpp:824
#11 0x00005555555f8a35 in BeebWindow::DoImGui(unsigned long) (this=0x555555f051b0, ticks=254619191352949) at ../../src/b2/BeebWindow.cpp:682
#12 0x00005555555fc12b in BeebWindow::HandleVBlank(unsigned long) (this=0x555555f051b0, ticks=254619191352949) at ../../src/b2/BeebWindow.cpp:1637
#13 0x00005555555fd9f8 in BeebWindow::HandleVBlank(VBlankMonitor*, void*, unsigned long) (this=0x555555f051b0, vblank_monitor=0x555555efeda0, display_data=0x555555f040b0, ticks=254619191352949)
    at ../../src/b2/BeebWindow.cpp:2179
#14 0x00005555555ae4ec in BeebWindows::HandleVBlank(VBlankMonitor*, void*, unsigned long) (vblank_monitor=0x555555efeda0, display_data=0x555555f040b0, ticks=254619191352949) at ../../src/b2/BeebWindows.cpp:320
#15 0x0000555555583c6c in main2(int, char**, std::shared_ptr<MessageList> const&) (argc=3, argv=0x7fffffffdf48, init_message_list=std::shared_ptr<MessageList> (use count 3, weak count 1) = {...})
    at ../../src/b2/b2.cpp:1075
#16 0x00005555555842d7 in main(int, char**) (argc=3, argv=0x7fffffffdf48) at ../../src/b2/b2.cpp:1173

Wrong release naming

Set release title to be the same name as the tag, never the text of the last commit.

This has only happened once, so I assume one of the CI servers does this properly, and one does this wrongly, and it's the one that's usually slower that's doing it wrongly...

More VIA stuff to check

  1. The T1 PB7 output is visible in ORB and IRB. Is it latched when latching is enabled?

  2. When T1 is re-enabled via the ACR, does it work normally (as b2 does it), or does it need to time out once first (as I think B-em has it)?

"Open File" is ready

Affects Linux version when running on Ubuntu with (I think?) the new GNOME desktop.

  1. Run b2
  2. Open file dialog, e.g., File > Drive 0 > Disc image
  3. Cancel file dialog
  4. Repeat step 1

The dialog appears, but it doesn't get focus, and a popup appears to alert you of this:

image

This seems to affect all invocations of the file dialog after the first. Not a major issue but it's a bit ugly.

Not really obvious what to search for, but this Chromium bug could be related, maybe, though it's gtk3 rather than gtk2: https://bugs.chromium.org/p/chromium/issues/detail?id=866189

Can't record video with no events

WriteVideoJob::ThreadExecute: uint64_t finish_cycles=m_event_list.events.back().time_2MHz_cycles; - no use if the event list is empty!

Linux CI

Binary distributions aren't really a thing on Linux, but it would be nice if Travis could at least get the latest source, build it (ideally both with and without ffmpeg), run ctest, and see what happens.

--Tom

NuLA (?) ropey scrolling

As seen on the Shadow of the Beast demo.

Might also be related to how nasty Planetoid's scrolling looks?

--Tom

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.