Skip to content

Commit

Permalink
Merge branch 'feature-315' of github.com:emustudio/emuStudio into fea…
Browse files Browse the repository at this point in the history
…ture-314

 Conflicts:
	plugins/memory/byte-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/MemoryGui.java
	plugins/memory/byte-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/actions/DumpMemoryAction.java
	plugins/memory/byte-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/actions/GotoAddressAction.java
	plugins/memory/byte-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/actions/LoadImageAction.java
	plugins/memory/byte-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/actions/find_sequence/PerformFindSequenceAction.java
	plugins/memory/byte-mem/src/main/java/net/emustudio/plugins/memory/bytemem/loaders/Loader.java
  • Loading branch information
vbmacher committed Feb 19, 2023
2 parents b3dd00b + ce2b80d commit 07d2127
Show file tree
Hide file tree
Showing 11 changed files with 288 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2681,7 +2681,7 @@ int I_CALL_NN() {
}

int I_LD_B_B() {
return I_LD_R_R(REG_B, REG_B);
return 4;
}

int I_LD_B_C() {
Expand Down Expand Up @@ -2745,7 +2745,7 @@ int I_LD_C_B() {
}

int I_LD_C_C() {
return I_LD_R_R(REG_C, REG_C);
return 4;
}

int I_LD_C_D() {
Expand Down Expand Up @@ -2809,7 +2809,7 @@ int I_LD_D_C() {
}

int I_LD_D_D() {
return I_LD_R_R(REG_D, REG_D);
return 4;
}

int I_LD_D_E() {
Expand Down Expand Up @@ -2873,7 +2873,7 @@ int I_LD_E_D() {
}

int I_LD_E_E() {
return I_LD_R_R(REG_E, REG_E);
return 4;
}

int I_LD_E_H() {
Expand Down Expand Up @@ -2937,7 +2937,7 @@ int I_LD_H_E() {
}

int I_LD_H_H() {
return I_LD_R_R(REG_H, REG_H);
return 4;
}

int I_LD_H_L() {
Expand Down Expand Up @@ -3059,7 +3059,7 @@ int I_LD_L_H() {
}

int I_LD_L_L() {
return I_LD_R_R(REG_L, REG_L);
return 4;
}

int I_LD_L_A() {
Expand Down Expand Up @@ -3181,7 +3181,7 @@ int I_LD_A_L() {
}

int I_LD_A_A() {
return I_LD_R_R(REG_A, REG_A);
return 4;
}

int I_LD_A_REF_HL() {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ private void initComponents() {
.addComponent(lblAddress))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(txtAddress, 64, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(txtBank, 64, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addComponent(txtAddress, 128, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(txtBank, 128, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* This file is part of emuStudio.
*
* Copyright (C) 2006-2023 Peter Jakubčo
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.emustudio.plugins.memory.bytemem.gui.actions;

import net.emustudio.plugins.memory.bytemem.gui.model.MemoryTableModel;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.util.Objects;

public class AsciiModeAction extends AbstractAction {
private final static String ICON_FILE = "/net/emustudio/plugins/memory/bytemem/gui/ascii-mode.png";
private final MemoryTableModel tableModel;
private final JToggleButton btnAsciiMode;

public AsciiModeAction(MemoryTableModel tableModel, JToggleButton btnAsciiMode) {
super("Toggle ASCII mode", new ImageIcon(AsciiModeAction.class.getResource(ICON_FILE)));
this.tableModel = Objects.requireNonNull(tableModel);
this.btnAsciiMode = Objects.requireNonNull(btnAsciiMode);
}

@Override
public void actionPerformed(ActionEvent e) {
tableModel.setAsciiMode(btnAsciiMode.isSelected());
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* This file is part of emuStudio.
*
* Copyright (C) 2006-2023 Peter Jakubčo
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.emustudio.plugins.memory.bytemem.gui.actions;

import net.emustudio.emulib.runtime.interaction.Dialogs;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* This file is part of emuStudio.
*
* Copyright (C) 2006-2023 Peter Jakubčo
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.emustudio.plugins.memory.bytemem.gui.actions;

import net.emustudio.plugins.memory.bytemem.MemoryContextImpl;
import net.emustudio.plugins.memory.bytemem.gui.model.MemoryTableModel;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.util.Objects;

public class EraseMemoryAction extends AbstractAction {
private final static String ICON_FILE = "/net/emustudio/plugins/memory/bytemem/gui/edit-clear.png";
private final MemoryTableModel tableModel;
private final MemoryContextImpl context;

public EraseMemoryAction(MemoryTableModel tableModel, MemoryContextImpl context) {
super("Erase memory", new ImageIcon(EraseMemoryAction.class.getResource(ICON_FILE)));
this.tableModel = Objects.requireNonNull(tableModel);
this.context = Objects.requireNonNull(context);
}

@Override
public void actionPerformed(ActionEvent e) {
context.clear();
tableModel.fireTableDataChanged();
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* This file is part of emuStudio.
*
* Copyright (C) 2006-2023 Peter Jakubčo
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.emustudio.plugins.memory.bytemem.gui.actions;

import net.emustudio.emulib.runtime.interaction.Dialogs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* This file is part of emuStudio.
*
* Copyright (C) 2006-2023 Peter Jakubčo
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.emustudio.plugins.memory.bytemem.gui.actions;

import net.emustudio.emulib.runtime.interaction.Dialogs;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* This file is part of emuStudio.
*
* Copyright (C) 2006-2023 Peter Jakubčo
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.emustudio.plugins.memory.bytemem.gui.actions;

import net.emustudio.emulib.runtime.interaction.Dialogs;
import net.emustudio.emulib.runtime.settings.PluginSettings;
import net.emustudio.plugins.memory.bytemem.MemoryContextImpl;
import net.emustudio.plugins.memory.bytemem.MemoryImpl;
import net.emustudio.plugins.memory.bytemem.gui.SettingsDialog;
import net.emustudio.plugins.memory.bytemem.gui.model.TableMemory;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.util.Objects;

public class SettingsAction extends AbstractAction {
private final static String ICON_FILE = "/net/emustudio/plugins/memory/bytemem/gui/preferences-system.png";
private final Dialogs dialogs;
private final JDialog parent;
private final MemoryContextImpl context;
private final MemoryImpl memory;
private final TableMemory table;
private final PluginSettings settings;

public SettingsAction(Dialogs dialogs, JDialog parent, MemoryImpl memory, MemoryContextImpl context,
TableMemory table, PluginSettings settings) {
super("Erase memory", new ImageIcon(SettingsAction.class.getResource(ICON_FILE)));
this.memory = Objects.requireNonNull(memory);
this.context = Objects.requireNonNull(context);
this.table = Objects.requireNonNull(table);
this.settings = Objects.requireNonNull(settings);
this.dialogs = Objects.requireNonNull(dialogs);
this.parent = Objects.requireNonNull(parent);
}

@Override
public void actionPerformed(ActionEvent e) {
new SettingsDialog(parent, memory, context, table, settings, dialogs).setVisible(true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import javax.swing.*;
import javax.swing.text.JTextComponent;
import java.awt.event.ActionEvent;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* This file is part of emuStudio.
*
* Copyright (C) 2006-2023 Peter Jakubčo
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.emustudio.plugins.memory.bytemem.loaders;

import net.emustudio.plugins.memory.bytemem.api.ByteMemoryContext;
Expand Down

0 comments on commit 07d2127

Please sign in to comment.