Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add defines, build pipeline, minor fixes #306

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions .github/workflows/build-winuae-binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Build WinUAE binary

on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master

env:
SOLUTION_FILE_PATH: od-win32\\winuae_msvc15

jobs:
Build-WinUAE-32bit-binary:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Add MSBuild to PATH
uses: microsoft/[email protected]

# Running roughly step 4 of README.md
- name: Download WinUAE includes and libs
shell: powershell
run: Invoke-WebRequest -Uri "https://download.abime.net/winuae/files/b/winuaeinclibs.zip" -OutFile "winuaeinclibs.zip"

- name: Unpack WinUAE includes and libs to C:\\dev
uses: ihiroky/extract-action@v1
with:
file_path: winuaeinclibs.zip
extract_dir: C:\\dev

# Running roughly step 6 of README.md
- name: Download AROS ROM cpp
shell: powershell
run: Invoke-WebRequest -Uri "https://download.abime.net/winuae/files/b/aros.rom.cpp.zip" -OutFile "aros.rom.cpp.zip"

- name: Unpack AROS ROM cpp
uses: ihiroky/extract-action@v1
with:
file_path: aros.rom.cpp.zip
extract_dir: .

# Running roughly step 7 of README.md
- name: Add NASM to PATH
uses: ilammy/[email protected]

# Running roughly step 12 of README.md
- name: Build Win32 FullRelease
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Platform=Win32 /p:Configuration=FullRelease ${{env.SOLUTION_FILE_PATH}}

- uses: actions/upload-artifact@v4
with:
name: WinUAE 32-bit
path: D:\\Amiga

Build-WinUAE-64bit-binary:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Add MSBuild to PATH
uses: microsoft/[email protected]

# Running roughly step 4 of README.md
- name: Download WinUAE includes and libs
shell: powershell
run: Invoke-WebRequest -Uri "https://download.abime.net/winuae/files/b/winuaeinclibs.zip" -OutFile "winuaeinclibs.zip"

- name: Unpack WinUAE includes and libs to C:\\dev
uses: ihiroky/extract-action@v1
with:
file_path: winuaeinclibs.zip
extract_dir: C:\\dev

# Running roughly step 6 of README.md
- name: Download AROS ROM cpp
shell: powershell
run: Invoke-WebRequest -Uri "https://download.abime.net/winuae/files/b/aros.rom.cpp.zip" -OutFile "aros.rom.cpp.zip"

- name: Unpack AROS ROM cpp
uses: ihiroky/extract-action@v1
with:
file_path: aros.rom.cpp.zip
extract_dir: .

# Running roughly step 7 of README.md
- name: Add NASM to PATH
uses: ilammy/[email protected]

# Running roughly step 12 of README.md
- name: Build x64 FullRelease
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Platform=x64 /p:Configuration=FullRelease ${{env.SOLUTION_FILE_PATH}}

- uses: actions/upload-artifact@v4
with:
name: WinUAE 64-bit
path: D:\\Amiga
10 changes: 10 additions & 0 deletions a2091.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
#include "cpuboard.h"
#include "rtc.h"
#include "devices.h"
#ifdef WITH_DSP
#include "dsp3210/dsp_glue.h"
#endif

#define DMAC_8727_ROM_VECTOR 0x8000
#define CDMAC_ROM_VECTOR 0x2000
Expand Down Expand Up @@ -3628,9 +3630,11 @@ static void mbdmac_write_word (struct wd_state *wd, uae_u32 addr, uae_u32 val)
break;
case 0x5e:
case 0x80:
#ifdef WITH_DSP
if (is_dsp_installed) {
dsp_write(val);
}
#endif
break;
}
}
Expand All @@ -3654,9 +3658,11 @@ static void mbdmac_write_byte (struct wd_state *wd, uae_u32 addr, uae_u32 val)
break;
case 0x5f:
case 0x80:
#ifdef WITH_DSP
if (is_dsp_installed) {
dsp_write(val);
}
#endif
break;
default:
if (addr & 1)
Expand Down Expand Up @@ -3726,9 +3732,11 @@ static uae_u32 mbdmac_read_word (struct wd_state *wd, uae_u32 addr)
break;
case 0x5e:
case 0x80:
#ifdef WITH_DSP
if (is_dsp_installed) {
v = dsp_read();
}
#endif
break;
}
#if A3000_DEBUG_IO > 1
Expand Down Expand Up @@ -3762,9 +3770,11 @@ static uae_u32 mbdmac_read_byte (struct wd_state *wd, uae_u32 addr)
break;
case 0x5f:
case 0x80:
#ifdef WITH_DSP
if (is_dsp_installed) {
v = dsp_read();
}
#endif
break;
}
#if A3000_DEBUG_IO > 1
Expand Down
8 changes: 8 additions & 0 deletions akiko.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,15 @@ static void *cd32_eeprom;
static uae_u8 cd32_i2c_direction;
static bool cd32_i2c_data_scl, cd32_i2c_data_sda;
struct zfile *cd32_flashfile;
#ifdef ARCADIA
extern uae_u8 *cubo_nvram;
#endif

static void nvram_read (void)
{
#ifdef ARCADIA
cubo_nvram = NULL;
#endif
zfile_fclose(cd32_flashfile);
cd32_flashfile = NULL;
eeprom_free(cd32_eeprom);
Expand All @@ -219,18 +223,22 @@ static void nvram_read (void)
cd32_nvram = xmalloc(uae_u8, maxlen);
}
memset(cd32_nvram, 0, maxlen);
#ifdef ARCADIA
if (is_board_enabled(&currprefs, ROMTYPE_CUBO, 0)) {
cubo_nvram = cd32_nvram + currprefs.cs_cd32nvram_size;
}
#endif
TCHAR path[MAX_DPATH];
cfgfile_resolve_path_out_load(currprefs.flashfile, path, MAX_DPATH, PATH_ROM);
cd32_flashfile = zfile_fopen (path, _T("rb+"), ZFD_NORMAL);
if (!cd32_flashfile)
cd32_flashfile = zfile_fopen (path, _T("wb"), 0);
if (cd32_flashfile) {
size_t size = zfile_fread(cd32_nvram, 1, currprefs.cs_cd32nvram_size, cd32_flashfile);
#ifdef ARCADIA
if (size == currprefs.cs_cd32nvram_size && maxlen > currprefs.cs_cd32nvram_size)
size += zfile_fread(cubo_nvram, 1, maxlen - currprefs.cs_cd32nvram_size, cd32_flashfile);
#endif
if (size < maxlen)
zfile_fwrite(cd32_nvram + size, 1, maxlen - size, cd32_flashfile);
}
Expand Down
55 changes: 24 additions & 31 deletions ar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,6 @@
#include "xwin.h"
#include "gfxboard.h"

#define DEBUG
#ifdef DEBUG
#define write_log_debug write_log
#else
#define write_log_debug
#endif

static const TCHAR *cart_memnames[] = { NULL, _T("hrtmon"), _T("arhrtmon"), _T("superiv") };

// Action Replay 2/3
Expand Down Expand Up @@ -702,20 +695,22 @@ static uae_u32 REGPARAM2 arram_lget (uaecptr addr)
addr -= arram_start;
addr &= arram_mask;
m = (uae_u32 *)(armemory_ram + addr);
#ifdef DEBUG
if (strncmp ("T8", (char*)m, 2) == 0)
write_log_debug (_T("Reading T8 from addr %08x PC=%08x\n"), addr, m68k_getpc ());
write_log (_T("Reading T8 from addr %08x PC=%08x\n"), addr, m68k_getpc ());
if (strncmp ("LAME", (char*)m, 4) == 0)
write_log_debug (_T("Reading LAME from addr %08x PC=%08x\n"), addr, m68k_getpc ());
write_log (_T("Reading LAME from addr %08x PC=%08x\n"), addr, m68k_getpc ());
if (strncmp ("RES1", (char*)m, 4) == 0)
write_log_debug (_T("Reading RES1 from addr %08x PC=%08x\n"), addr, m68k_getpc ());
write_log (_T("Reading RES1 from addr %08x PC=%08x\n"), addr, m68k_getpc ());
if (strncmp ("ARON", (char*)m, 4) == 0)
write_log_debug (_T("Reading ARON from addr %08x PC=%08x\n"), addr, m68k_getpc ());
write_log (_T("Reading ARON from addr %08x PC=%08x\n"), addr, m68k_getpc ());
if (strncmp ("KILL", (char*)m, 4) == 0)
write_log_debug (_T("Reading KILL from addr %08x PC=%08x\n"), addr, m68k_getpc ());
write_log (_T("Reading KILL from addr %08x PC=%08x\n"), addr, m68k_getpc ());
if (strncmp ("BRON", (char*)m, 4) == 0)
write_log_debug (_T("Reading BRON from addr %08x PC=%08x\n"), addr, m68k_getpc ());
write_log (_T("Reading BRON from addr %08x PC=%08x\n"), addr, m68k_getpc ());
if (strncmp ("PRIN", (char*)m, 4) == 0)
write_log_debug (_T("Reading PRIN from addr %08x PC=%08x\n"), addr, m68k_getpc ());
write_log (_T("Reading PRIN from addr %08x PC=%08x\n"), addr, m68k_getpc ());
#endif
return do_get_mem_long (m);
}

Expand Down Expand Up @@ -748,20 +743,22 @@ void REGPARAM2 arram_lput (uaecptr addr, uae_u32 l)
addr -= arram_start;
addr &= arram_mask;
m = (uae_u32 *)(armemory_ram + addr);
#ifdef DEBUG
if (strncmp ("T8", (char*)m, 2) == 0)
write_log_debug (_T("Writing T8 to addr %08x PC=%08x\n"), addr, m68k_getpc ());
write_log (_T("Writing T8 to addr %08x PC=%08x\n"), addr, m68k_getpc ());
if (strncmp ("LAME", (char*)m, 4) == 0)
write_log_debug (_T("Writing LAME to addr %08x PC=%08x\n"), addr, m68k_getpc ());
write_log (_T("Writing LAME to addr %08x PC=%08x\n"), addr, m68k_getpc ());
if (strncmp ("RES1", (char*)m, 4) == 0)
write_log_debug (_T("Writing RES1 to addr %08x PC=%08x\n"), addr, m68k_getpc ());
write_log (_T("Writing RES1 to addr %08x PC=%08x\n"), addr, m68k_getpc ());
if (strncmp ("ARON", (char*)m, 4) == 0)
write_log_debug (_T("Writing ARON to addr %08x PC=%08x\n"), addr, m68k_getpc ());
write_log (_T("Writing ARON to addr %08x PC=%08x\n"), addr, m68k_getpc ());
if (strncmp ("KILL", (char*)m, 4) == 0)
write_log_debug (_T("Writing KILL to addr %08x PC=%08x\n"), addr, m68k_getpc ());
write_log (_T("Writing KILL to addr %08x PC=%08x\n"), addr, m68k_getpc ());
if (strncmp ("BRON", (char*)m, 4) == 0)
write_log_debug (_T("Writing BRON to addr %08x PC=%08x\n"), addr, m68k_getpc ());
write_log (_T("Writing BRON to addr %08x PC=%08x\n"), addr, m68k_getpc ());
if (strncmp ("PRIN", (char*)m, 4) == 0)
write_log_debug (_T("Writing PRIN to addr %08x PC=%08x\n"), addr, m68k_getpc ());
write_log (_T("Writing PRIN to addr %08x PC=%08x\n"), addr, m68k_getpc ());
#endif
do_put_mem_long (m, l);
}

Expand Down Expand Up @@ -1502,9 +1499,10 @@ int action_replay_unload (int in_memory_reset)

if (!armemory_rom && !hrtmemory)
return 0;

write_log_debug (_T("Action Replay State:(%s)\nHrtmon State:(%s)\n"),
#ifdef DEBUG
write_log (_T("Action Replay State:(%s)\nHrtmon State:(%s)\n"),
state[action_replay_flag + 3], state[hrtmon_flag + 3]);
#endif

unset_special (SPCFLAG_ACTION_REPLAY); /* This shouldn't be necessary here, but just in case. */
action_replay_flag = ACTION_REPLAY_INACTIVE;
Expand Down Expand Up @@ -1650,7 +1648,9 @@ int action_replay_load (void)
if (currprefs.cs_cd32fmv)
return 0;

write_log_debug (_T("Entered action_replay_load ()\n"));
#ifdef DEBUG
write_log (_T("Entered action_replay_load ()\n"));
#endif

rd = getromdatabypath (currprefs.cartfile);
if (rd) {
Expand Down Expand Up @@ -1755,13 +1755,6 @@ void action_replay_cleanup()
hrtmem2_end = 0;
}

#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif

int hrtmon_lang = 0;

static void hrtmon_configure(void)
Expand Down
Loading