Skip to content

Commit

Permalink
Merge pull request #399 from lgblgblgb/next
Browse files Browse the repository at this point in the history
Next
  • Loading branch information
lgblgblgb authored May 11, 2024
2 parents 968f7e0 + 089ad07 commit 828804b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dist: focal
dist: jammy
sudo: required
language: c

Expand Down
1 change: 1 addition & 0 deletions build/configure/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
all:
@if [ "$(ARCH)" = "" ]; then echo "You must invoke make with ARCH set." ; exit 1 ; fi
bash ./configure --arch=$(ARCH)
29 changes: 19 additions & 10 deletions build/configure/configure
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## This file is part of the Xemu project: https://github.com/lgblgblgb/xemu
## Collection of various emulators of some 8 bits machines using SDL2 library.
##
## Copyright (C)2016-2023 LGB (Gábor Lénárt) <[email protected]>
## Copyright (C)2016-2024 LGB (Gábor Lénárt) <[email protected]>
#
# 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 Expand Up @@ -30,12 +30,27 @@ export LANG LC_TIME

echo -n "Testing needed UNIX tools for the build: "

echo -n "grep "
if [ "`echo 'alma,korte,banan' | grep -oEia ',K[^,]+,'`" != ",korte," ]; then
echo -n "uname "
if [ "`uname -a`" = "" ]; then
echo
echo "FATAL: UNIX utility 'grep' does not seem to work or cannot be found" >&2
echo "FATAL: UNIX utility 'uname' does not seem to work or cannot be found" >&2
exit 1
fi
if [ "`uname`" != "Linux" ]; then
echo -n "grep[-Eia] "
if [ "`echo 'alma,korte,banan' | grep -Eia ',K[^,]+,'`" != "alma,korte,banan" ]; then
echo
echo "FATAL: UNIX utility 'grep' does not seem to work (grep -Eia) or cannot be found" >&2
exit 1
fi
else
echo -n "grep[-oEia] "
if [ "`echo 'alma,korte,banan' | grep -oEia ',K[^,]+,'`" != ",korte," ]; then
echo
echo "FATAL: UNIX utility 'grep' does not seem to work (grep -oEia) or cannot be found" >&2
exit 1
fi
fi
echo -n "sed "
if [ "`echo "testSTRSTRing" | sed -nE 's/(STR)/_\1/gp'`" != "test_STR_STRing" ]; then
echo
Expand Down Expand Up @@ -71,12 +86,6 @@ if [ "`pwd`" = "" ]; then
echo "FATAL: UNIX utility 'pwd' does not seem to work or cannot be found" >&2
exit 1
fi
echo -n "uname "
if [ "`uname -a`" = "" ]; then
echo
echo "FATAL: UNIX utility 'uname' does not seem to work or cannot be found" >&2
exit 1
fi
echo -n "date "
if [ "`date`" = "" ]; then
echo
Expand Down
10 changes: 8 additions & 2 deletions targets/mega65/audio65.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* A work-in-progess MEGA65 (Commodore 65 clone origins) emulator
Part of the Xemu project, please visit: https://github.com/lgblgblgb/xemu
Copyright (C)2016-2021 LGB (Gábor Lénárt) <[email protected]>
Copyright (C)2016-2024 LGB (Gábor Lénárt) <[email protected]>
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 Expand Up @@ -191,7 +191,13 @@ static inline void render_dma_audio ( int channel, Sint16 *buffer, int len )
// the final sample value, correcting with the sound setting (FIXME: I am really not sure, if volume is supposed to be linear ...)
sample[channel] = ((int)signed_sample * chio[9]) / 0xFF; // volume control (max volume is $FF)
}
if (XEMU_UNLIKELY((addr & 0xFFFF) == limit)) {
if (XEMU_UNLIKELY(
((addr & 0xFFFFU) == limit) // limit reached
|| ( // OR ...
(chio[0] & 3) == 3 && // ... 16 bit sample
((addr - 1) & 0xFFFFU) == limit // ... and the limit was the previous byte (as with 16 bit samples we would miss the limit if not aligned!)
)
)) {
// if top address is reached: either stop, or loop (on looped samples only!)
if ((chio[0] & 0x40)) {
addr = chio[1] + (chio[2] << 8) + (chio[3] << 16); // looping, set address to the begin address
Expand Down
2 changes: 1 addition & 1 deletion targets/mega65/audio65.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* A work-in-progess MEGA65 (Commodore-65 clone origins) emulator
Part of the Xemu project, please visit: https://github.com/lgblgblgb/xemu
Copyright (C)2016-2021 LGB (Gábor Lénárt) <[email protected]>
Copyright (C)2016-2024 LGB (Gábor Lénárt) <[email protected]>
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
4 changes: 3 additions & 1 deletion targets/mega65/vic4.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* A work-in-progess MEGA65 (Commodore 65 clone origins) emulator
Part of the Xemu project, please visit: https://github.com/lgblgblgb/xemu
Copyright (C)2016-2023 LGB (Gábor Lénárt) <[email protected]>
Copyright (C)2016-2024 LGB (Gábor Lénárt) <[email protected]>
Copyright (C)2020-2022 Hernán Di Pietro <[email protected]>
This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -1443,6 +1443,8 @@ static XEMU_INLINE void vic4_render_char_raster ( void )
used_palette = palette; // we do this as well, since there can be "double GOTOX" so we want back to "original" palette ...
if (SXA_4BIT_PER_PIXEL(color_data)) // this signals for rowmask [the rowmask itself is color_data & 0xFF]
draw_mask = (color_data & (1 << char_row)) ? 0xFF : 0x00; // draw_mask is $FF (not masked) _or_ $00 (masked) ~ for the current char_row!
else
draw_mask = 0xFF;
continue;
}
}
Expand Down

0 comments on commit 828804b

Please sign in to comment.