Skip to content

Commit

Permalink
Merge pull request #295 from lgblgblgb/next
Browse files Browse the repository at this point in the history
Merge 'next' (re-based 'merger') as 'master'
  • Loading branch information
lgblgblgb authored Sep 23, 2021
2 parents c07caa0 + f99c029 commit 51ab501
Show file tree
Hide file tree
Showing 46 changed files with 2,731 additions and 1,500 deletions.
16 changes: 13 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ matrix:
- zip
compiler: gcc
before_script:
- echo "127.126.125.124 lgb" | sudo tee -a /etc/hosts 2>/dev/null || true
- cat /etc/hosts || true
- hostname
- set +e
- uname -a ; lsb_release -a || true ; hostname ; pwd ; df -h ; id -a
- hostname
- set -e
- sdl2-config --version --prefix --cflags --libs --static-libs
- pkg-config --cflags-only-I --libs gtk+-3.0
Expand Down Expand Up @@ -77,6 +79,7 @@ matrix:
- dev
- vic
- hmw
- merger
after_deploy:
- build/deploy/discord-webhook.sh success "Ubuntu Linux DEB" ANY:DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK master,hmw,next:DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK || true
- name: Windows cross-compilation on Linux
Expand All @@ -102,10 +105,12 @@ matrix:
- wget
- zip
before_script:
- echo "127.126.125.124 lgb" | sudo tee -a /etc/hosts 2>/dev/null || true
- cat /etc/hosts || true
- hostname
- set +e
- uname -a ; pwd ; df -h ; id -a
- set -e
- hostname
- build/install-cross-win-mingw-sdl-on-linux.sh /usr/bin
- set +e
- ps auxwwww || true
Expand Down Expand Up @@ -151,6 +156,7 @@ matrix:
- dev
- vic
- hmw
- merger
after_deploy:
- build/deploy/discord-webhook.sh success "Windows" ANY:DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK master,hmw,next:DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK || true
- name: MacOS native compilation
Expand All @@ -163,9 +169,11 @@ matrix:
- create-dmg
- sdl2
before_script:
- echo "127.126.125.124 lgb" | sudo tee -a /etc/hosts 2>/dev/null || true
- cat /etc/hosts || true
- hostname
- set +e
- uname -a ; pwd ; df -h ; id -a
- hostname
- set -e
- sdl2-config --version --prefix --cflags --libs --static-libs
- set +e
Expand Down Expand Up @@ -203,6 +211,8 @@ matrix:
- dev
- vic
- hmw
- discord
- merger
after_deploy:
- build/deploy/discord-webhook.sh success "MacOS(x86)" ANY:DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK master,hmw,next:DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK || true

Expand Down
4 changes: 4 additions & 0 deletions build/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ endif
ifeq ($(SUPERPICKY), yes)
CONFIG_CFLAGS += $(CONFIG_CFLAGS_SUPERPICKY)
endif
ifeq ($(STACKPROTECTOR), yes)
CONFIG_CFLAGS += -fstack-protector-strong
CONFIG_CFLAGS_LINK += -fstack-protector-strong
endif

CFLAGS = $(CONFIG_CFLAGS) $(CFLAGS_OPT) $(CFLAGS_TARGET) -I. -I$(TOPDIR) -include build/configure/config-$(ARCH).h
LDFLAGS = $(CONFIG_CFLAGS_LINK) $(LDFLAGS_TARGET)
Expand Down
22 changes: 13 additions & 9 deletions rom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ SHELL = sh
AWK = awk
CL65 = cl65
URL_LIST = rom-fetch-list.txt
#OUR_ROMS = clcd-u104-parasite.rom vic20-emulator-tool.rom
OUR_ROMS = vic20-emulator-tool.rom
#FETCH_ROMS = vic20-basic.rom vic20-kernal.rom vic20-chargen.rom clcd-u105.rom clcd-u102.rom clcd-u104.rom clcd-u103.rom c65-system.rom c64-chargen.rom c64-kernal.rom c64-basic.rom primo-b64.rom
#FETCH_ROMS = $(shell awk '{ print $$1 }' $(URL_LIST))
OUR_ROMS = vic20-emulator-tool.rom c65-minimal-rom.rom clcd-u104-parasite.rom
OUR_INCS = c65-minimal-rom.cdata

all: roms $(OUR_ROMS)
all: $(OUR_ROMS) $(OUR_INCS)

clean:
rm -f *.o
Expand All @@ -35,10 +33,16 @@ distclean:
$(MAKE) clean
rm -f `$(AWK) 'NF == 3 && $$1 ~ /^[a-zA-Z0-9]/ { print $$1 }' < $(URL_LIST)`

%.rom: %.asm
$(CL65) -t none --cpu 65c02 -o $@ $<
%.rom: %.asm Makefile
@echo "<<< Crafting $@ >>>"
$(CL65) -t none -o $@ $<
rm -f $(<:.asm=.o)

roms:
%.cdata: %.rom Makefile
@echo "<<< Crafting $@ >>>"
cat $< | xxd -i > $@

fetchroms:
$(AWK) 'NF == 3 && $$1 ~ /^[a-zA-Z0-9]/ { print "test -s " $$1 " || { rm -f " $$1 ".tmp && $(WGET) -O " $$1 ".tmp " $$2 " && mv " $$1 ".tmp " $$1 "; } || exit $$?" }' < $(URL_LIST) | $(SHELL)

.PHONY: all clean distclean roms
.PHONY: all clean distclean fetchroms
31 changes: 31 additions & 0 deletions rom/c65-minimal-rom.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
; This is a very simple C65 (or MEGA65) ROM, which is totally unusable,
; just enough to display a message for Xemu users, so they get to know
; what they should do. This is not a "normal" ROM either by layout,
; but has "ID points". Only useful really, inside Xemu.
;
; Copyright (C)2021 LGB (Gábor Lénárt) <lgblgblgb@gmail.com>
;
; 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 2 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, write to the Free Software
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

.SETCPU "4510"
.ORG 0

; "C65 ROM version" style of string, since it's used by Xemu to figure out
; the needed DMA revision for the given ROM.

.BYTE "V911111"



1 change: 1 addition & 0 deletions rom/c65-minimal-rom.cdata
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0x56, 0x39, 0x31, 0x31, 0x31, 0x31, 0x31
1 change: 1 addition & 0 deletions rom/c65-minimal-rom.rom
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
V911111
2 changes: 2 additions & 0 deletions rom/clcd-u104-parasite.asm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
; along with this program; if not, write to the Free Software
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

.SETCPU "65C02"

START = $4000

.ORG START
Expand Down
16 changes: 14 additions & 2 deletions targets/c65/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ static void ui_attach_d81_by_browsing ( int drive )
static void ui_attach_d81_by_browsing_8 ( void ) { ui_attach_d81_by_browsing(0); }
static void ui_attach_d81_by_browsing_9 ( void ) { ui_attach_d81_by_browsing(1); }

static void ui_cb_detach_d81 ( const struct menu_st *m, int *query )
{
XEMUGUI_RETURN_CHECKED_ON_QUERY(query, 0);
d81access_close(VOIDPTR_TO_INT(m->user_data));
}

static void ui_run_prg_by_browsing ( void )
{
char fnbuf[PATH_MAX + 1];
Expand Down Expand Up @@ -291,13 +297,19 @@ static const struct menu_st menu_rom[] = {
{ "Load Xemu default ROM", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_load_rom_default },
{ NULL }
};
static const struct menu_st menu_drives[] = {
{ "Attach D81 to drive 8", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_attach_d81_by_browsing_8 },
{ "Detach D81 from drive 8", XEMUGUI_MENUID_CALLABLE, ui_cb_detach_d81, (void*)0 },
{ "Attach D81 to drive 9", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_attach_d81_by_browsing_9 },
{ "Detach D81 from drive 9", XEMUGUI_MENUID_CALLABLE, ui_cb_detach_d81, (void*)1 },
{ NULL }
};
static const struct menu_st menu_main[] = {
{ "Display", XEMUGUI_MENUID_SUBMENU, NULL, menu_display },
{ "Reset", XEMUGUI_MENUID_SUBMENU, NULL, menu_reset },
{ "Debug", XEMUGUI_MENUID_SUBMENU, NULL, menu_debug },
{ "ROM", XEMUGUI_MENUID_SUBMENU, NULL, menu_rom },
{ "Attach D81 to drive 8", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_attach_d81_by_browsing_8 },
{ "Attach D81 to drive 9", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_attach_d81_by_browsing_9 },
{ "Drives / D81 images", XEMUGUI_MENUID_SUBMENU, NULL, menu_drives },
{ "Run PRG directly", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_run_prg_by_browsing },
#ifdef XEMU_ARCH_WIN
{ "System console", XEMUGUI_MENUID_CALLABLE |
Expand Down
1 change: 0 additions & 1 deletion targets/ep128/.gitignore

This file was deleted.

3 changes: 1 addition & 2 deletions targets/ep128/enterprise128.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define SCREEN_WIDTH 736
#define SCREEN_HEIGHT 288
#define SCREEN_FORMAT SDL_PIXELFORMAT_ARGB8888
// !!! currently ep128 emu does NOT work if you modify this !!!
#define USE_LOCKED_TEXTURE 0
#define USE_LOCKED_TEXTURE 1
#define RENDER_SCALE_QUALITY 0

#define DEFAULT_ROM_FN "#exos.rom"
Expand Down
8 changes: 4 additions & 4 deletions targets/ep128/epnet.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Minimalistic Enterprise-128 emulator with focus on "exotic" hardware
Part of the Xemu project, please visit: https://github.com/lgblgblgb/xemu
Copyright (C)2015-2016,2020 LGB (Gábor Lénárt) <lgblgblgb@gmail.com>
Copyright (C)2015-2016,2020-2021 LGB (Gábor Lénárt) <lgblgblgb@gmail.com>
Partial Wiznet W5300 emulation, using the host OS (which runs the emulator)
TCP/IP API. Thus, many of the W5300 features won't work, or limited, like:
Expand Down Expand Up @@ -641,9 +641,9 @@ void epnet_init ( void (*cb)(int) )
{
w5300_does_work = 0;
patch_rom();
char sockapi_error_msg[256];
if (xemusock_init(sockapi_error_msg)) {
ERROR_WINDOW("Cannot intiailize socket API:\n%s", sockapi_error_msg);
const char *init_status = xemusock_init();
if (init_status) {
ERROR_WINDOW("Cannot intiailize socket API:\n%s", init_status);
w5300_does_work = 0;
} else if (!start_net_thread()) {
w5300_does_work = 1;
Expand Down
2 changes: 1 addition & 1 deletion targets/ep128/epnet.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Minimalistic Enterprise-128 emulator with focus on "exotic" hardware
Part of the Xemu project, please visit: https://github.com/lgblgblgb/xemu
Copyright (C)2015-2016,2020 LGB (Gábor Lénárt) <lgblgblgb@gmail.com>
Copyright (C)2015-2016,2020-2021 LGB (Gábor Lénárt) <lgblgblgb@gmail.com>
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
Expand Down
Loading

0 comments on commit 51ab501

Please sign in to comment.