Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
Conflicts:
	.github/workflows/cmake-mingw.yml
	.github/workflows/cmake-ubuntu.yml
	.github/workflows/cmake.yml
  • Loading branch information
dirkwhoffmann committed Jan 6, 2023
2 parents f65c8b4 + 5857285 commit 9c74e6d
Show file tree
Hide file tree
Showing 163 changed files with 3,428 additions and 3,790 deletions.
1 change: 0 additions & 1 deletion .github/workflows/cmake-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@ jobs:
# - name: Test
# working-directory: ${{github.workspace}}/build
# run: ctest --verbose -C ${{env.BUILD_TYPE}}

File renamed without changes.
30 changes: 30 additions & 0 deletions .github/workflows/cmake-ubuntu.yml~dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CMake-Ubuntu

on:
push:
pull_request:
schedule:
- cron: '40 5 * * *'

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Configure CMake
working-directory: ./Emulator
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
working-directory: ./Emulator
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest --verbose -C ${{env.BUILD_TYPE}}

5 changes: 1 addition & 4 deletions Emulator/Agnus/Agnus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace vamiga {

Agnus::Agnus(Amiga& ref) : SubComponent(ref)
{
subComponents = std::vector<AmigaComponent *> {
subComponents = std::vector<CoreComponent *> {

&sequencer,
&copper,
Expand Down Expand Up @@ -151,9 +151,6 @@ Agnus::setVideoFormat(VideoFormat newFormat)
// Clear frame buffers
denise.pixelEngine.clearAll();

// Let the audio engine know about the speed change
paula.muxer.adjustSpeed();

// Inform the GUI
msgQueue.put(MSG_VIDEO_FORMAT, newFormat);
}
Expand Down
22 changes: 4 additions & 18 deletions Emulator/Agnus/Agnus.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class Agnus : public SubComponent {


//
// Methods from AmigaObject
// Methods from CoreObject
//

private:
Expand All @@ -218,7 +218,7 @@ class Agnus : public SubComponent {


//
// Methods from AmigaComponent
// Methods from CoreComponent
//

private:
Expand Down Expand Up @@ -341,8 +341,8 @@ class Agnus : public SubComponent {

public:

AgnusInfo getInfo() const { return AmigaComponent::getInfo(info); }
EventInfo getEventInfo() const { return AmigaComponent::getInfo(eventInfo); }
AgnusInfo getInfo() const { return CoreComponent::getInfo(info); }
EventInfo getEventInfo() const { return CoreComponent::getInfo(eventInfo); }
EventSlotInfo getSlotInfo(isize nr) const;
const AgnusStats &getStats() { return stats; }

Expand Down Expand Up @@ -673,14 +673,6 @@ class Agnus : public SubComponent {
scheduleAbs<s>(clock + cycle, id, data);
}

/*
template<EventSlot s> void schedulePos(Beam target, EventID id, i64 data) {
assert(target.v > pos.v || (target.v == pos.v && target.h >= pos.h));
scheduleRel<s>(DMA_CYCLES(pos.diff(target.v, target.h)), id, data);
}
*/

template<EventSlot s> void schedulePos(isize vpos, isize hpos, EventID id) {

assert(vpos > pos.v || (vpos == pos.v && hpos >= pos.h));
Expand All @@ -697,12 +689,6 @@ class Agnus : public SubComponent {
rescheduleAbs<s>(clock + cycle);
}

/*
template<EventSlot s> void reschedulePos(Beam pos) {
rescheduleAbs<s>(beamToCycle(pos));
}
*/

template<EventSlot s> void reschedulePos(i16 vpos, i16 hpos) {

assert(vpos > pos.v || (vpos == pos.v && hpos >= pos.h));
Expand Down
6 changes: 4 additions & 2 deletions Emulator/Agnus/AgnusInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -646,13 +646,15 @@ Agnus::_dump(Category category, std::ostream& os) const
}

if (category == Category::Events) {

inspect();

os << std::left << std::setw(10) << "Slot";
os << std::left << std::setw(14) << "Event";
os << std::left << std::setw(18) << "Trigger position";
os << std::left << std::setw(16) << "Trigger cycle" << std::endl;

for (isize i = 0; i < 23; i++) {
for (isize i = 0; i < SLOT_COUNT; i++) {

EventSlotInfo &info = slotInfo[i];

Expand Down Expand Up @@ -762,7 +764,7 @@ Agnus::inspectSlot(EventSlot nr) const
info.hpos = beam.h;
info.frameRel = long(beam.frame - pos.frame);

info.eventName = agnus.eventName((EventSlot)nr, id[nr]);
info.eventName = eventName((EventSlot)nr, id[nr]);
}

EventSlotInfo
Expand Down
2 changes: 2 additions & 0 deletions Emulator/Agnus/AgnusTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,14 @@ enum_i8(EventID)
INS_EVENT_COUNT
};

/*
static inline bool isRegEvent(EventID id) { return id < REG_EVENT_COUNT; }
static inline bool isCiaEvent(EventID id) { return id < CIA_EVENT_COUNT; }
static inline bool isBplEvent(EventID id) { return id < BPL_EVENT_COUNT; }
static inline bool isDasEvent(EventID id) { return id < DAS_EVENT_COUNT; }
static inline bool isCopEvent(EventID id) { return id < COP_EVENT_COUNT; }
static inline bool isBltEvent(EventID id) { return id < BLT_EVENT_COUNT; }
*/

static inline bool isBplxEvent(EventID id, int x)
{
Expand Down
2 changes: 1 addition & 1 deletion Emulator/Agnus/Blitter/Blitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Blitter::Blitter(Amiga& ref) : SubComponent(ref)
void
Blitter::_initialize()
{
AmigaComponent::_initialize();
CoreComponent::_initialize();

initFastBlitter();
initSlowBlitter();
Expand Down
6 changes: 3 additions & 3 deletions Emulator/Agnus/Blitter/Blitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class Blitter : public SubComponent


//
// Methods from AmigaObject
// Methods from CoreObject
//

private:
Expand All @@ -201,7 +201,7 @@ class Blitter : public SubComponent


//
// Methods from AmigaComponent
// Methods from CoreComponent
//

private:
Expand Down Expand Up @@ -301,7 +301,7 @@ class Blitter : public SubComponent

public:

BlitterInfo getInfo() const { return AmigaComponent::getInfo(info); }
BlitterInfo getInfo() const { return CoreComponent::getInfo(info); }


//
Expand Down
2 changes: 1 addition & 1 deletion Emulator/Agnus/Copper/Copper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace vamiga {

Copper::Copper(Amiga& ref) : SubComponent(ref)
{
subComponents = std::vector<AmigaComponent *> {
subComponents = std::vector<CoreComponent *> {

&debugger
};
Expand Down
6 changes: 3 additions & 3 deletions Emulator/Agnus/Copper/Copper.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Copper : public SubComponent


//
// Methods from AmigaObject
// Methods from CoreObject
//

private:
Expand All @@ -106,7 +106,7 @@ class Copper : public SubComponent


//
// Methods from AmigaComponent
// Methods from CoreComponent
//

private:
Expand Down Expand Up @@ -150,7 +150,7 @@ class Copper : public SubComponent
public:

// Returns the result of the latest inspection
CopperInfo getInfo() const { return AmigaComponent::getInfo(info); }
CopperInfo getInfo() const { return CoreComponent::getInfo(info); }


//
Expand Down
40 changes: 29 additions & 11 deletions Emulator/Agnus/Copper/CopperDebugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,22 @@ CopperDebugger::_dump(Category category, std::ostream& os) const
{
using namespace util;

auto print = [&](const string &name, const moira::Guards &guards) {

for (int i = 0; i < guards.elements(); i++) {

auto bp = guards.guardNr(i);
auto nr = name + std::to_string(i);

os << tab(nr);
os << hex(bp->addr);

if (!bp->enabled) os << " (Disabled)";
else if (bp->ignore) os << " (Disabled for " << dec(bp->ignore) << " hits)";
os << std::endl;
}
};

if (!amiga.inDebugMode()) {

os << "No recorded data. Debug mode is off." << std::endl;
Expand All @@ -63,18 +79,20 @@ CopperDebugger::_dump(Category category, std::ostream& os) const
}

if (category == Category::Breakpoints) {

for (int i = 0; i < breakpoints.elements(); i++) {

auto bp = breakpoints.guardNr(i);
auto nr = "Breakpoint " + std::to_string(i);

os << util::tab(nr);
os << util::hex(bp->addr);

if (!bp->enabled) os << " (Disabled)";
else if (bp->ignore) os << " (Disabled for " << bp->ignore << " hits)";
os << std::endl;
if (breakpoints.elements()) {
print("Breakpoint", breakpoints);
} else {
os << "No breakpoints set" << std::endl;
}
}

if (category == Category::Watchpoints) {

if (watchpoints.elements()) {
print("Watchpoint", watchpoints);
} else {
os << "No watchpoints set" << std::endl;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Emulator/Agnus/Copper/CopperDebugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class CopperDebugger: public SubComponent {


//
// Methods from AmigaObject
// Methods from CoreObject
//

private:
Expand All @@ -82,7 +82,7 @@ class CopperDebugger: public SubComponent {


//
// Methods from AmigaComponent
// Methods from CoreComponent
//

private:
Expand Down
4 changes: 2 additions & 2 deletions Emulator/Agnus/DmaDebugger/DmaDebugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DmaDebugger : public SubComponent {


//
// Methods from AmigaObject
// Methods from CoreObject
//

private:
Expand All @@ -58,7 +58,7 @@ class DmaDebugger : public SubComponent {


//
// Methods from AmigaComponent
// Methods from CoreComponent
//

private:
Expand Down
4 changes: 2 additions & 2 deletions Emulator/Agnus/Sequencer/Sequencer.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class Sequencer : public SubComponent


//
// Methods from AmigaObject
// Methods from CoreObject
//

private:
Expand All @@ -220,7 +220,7 @@ class Sequencer : public SubComponent


//
// Methods from AmigaComponent
// Methods from CoreComponent
//

private:
Expand Down
Loading

0 comments on commit 9c74e6d

Please sign in to comment.