Skip to content

Commit e52be45

Browse files
committed
Squashed commit of the following:
commit c52294b Author: Krystian Bacławski <krystian.baclawski@gmail.com> Date: Sat Dec 16 16:50:33 2023 +0100 Backport miscellaneous changes from ELF commit f3d5a5c Author: Aleksandra <aleksandra.banasiak@protonmail.com> Date: Sun Dec 10 21:42:21 2023 +0100 PNG2C rewrite in Golang (#91) Co-authored-by: Krystian Bacławski <krystian.baclawski@gmail.com> commit feb97ba Author: Krystian Bacławski <krystian.baclawski@gmail.com> Date: Sun Nov 26 09:13:22 2023 +0100 Clean up PaletteT interface and use cases (backported from 6498094) commit 445c236 Author: Krystian Bacławski <krystian.baclawski@gmail.com> Date: Mon Nov 20 21:29:05 2023 +0100 Fix type comparison in Python source code. commit 535c594 Author: Krystian Bacławski <krystian.baclawski@gmail.com> Date: Mon Nov 20 21:12:36 2023 +0100 CopListReset: it's useful to return the pointer (backported from 011df6f) commit 0bc9420 Author: Krystian Bacławski <krystian.baclawski@gmail.com> Date: Sat Jul 22 22:36:02 2023 +0200 Clean up CopList interface (backported from 839fddd) * Replace CopInit with CopListReset. * NewCopList initialises the list by default (as if CopListReset was called). * Replace CopEnd with CopListFinish that returns copper list pointer. * Clean up MakeCopperList in the effects. * Panic if used more copper list entries than available. * Fix double buffering in some effects. commit a015394 Author: Krystian Bacławski <krystian.baclawski@gmail.com> Date: Sat Jul 22 17:14:21 2023 +0200 Always pass flags to NewBitmap (backported from fda8ae8) * Remove NewBitmapCustom. * Replace BM_DISPLAYABLE with BM_CPUONLY of opposite meaning. commit bc7ca92 Author: Krystian Bacławski <krystian.baclawski@gmail.com> Date: Wed Jul 19 22:35:36 2023 +0200 Pair of CopInsT to store 32-bit pointers (backported from 3f01af7) * Introduce CopInsPairT to express 32-bit pointer stores. * multipipe: put all cop insns per line into single structure * prisms: similar trick as for multipipe * Fix effects in intro directory. commit 963eb7b Author: Krystian Bacławski <krystian.baclawski@gmail.com> Date: Wed Jul 19 21:59:09 2023 +0200 Keep LOADED/READY state in Load/Init lower bit (backported from dd7cba0) commit e679bcd Author: Aleksandra <aleksandra.banasiak@protonmail.com> Date: Tue Jul 4 21:52:32 2023 +0200 Backported changes from f4f7128 * Add VBlank hook to effects * Make effects use the VBlank handler * Remove ptplayer.asm features on demand * Fix mt_data symbol address * Fix anim-polygons Makefile * EffectRun: do not render same frame multiple times.
1 parent b270512 commit e52be45

140 files changed

Lines changed: 1954 additions & 1632 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 5 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,9 @@
11
---
2-
Language: Cpp
3-
# BasedOnStyle: LLVM
4-
AccessModifierOffset: -2
5-
AlignAfterOpenBracket: Align
6-
AlignConsecutiveAssignments: false
7-
AlignConsecutiveDeclarations: false
8-
AlignEscapedNewlinesLeft: false
9-
AlignOperands: true
10-
AlignTrailingComments: true
11-
AllowAllParametersOfDeclarationOnNextLine: true
12-
AllowShortBlocksOnASingleLine: false
13-
AllowShortCaseLabelsOnASingleLine: false
14-
AllowShortFunctionsOnASingleLine: None
15-
AllowShortIfStatementsOnASingleLine: false
16-
AllowShortLoopsOnASingleLine: false
17-
AlwaysBreakAfterDefinitionReturnType: None
18-
AlwaysBreakAfterReturnType: None
19-
AlwaysBreakBeforeMultilineStrings: false
20-
AlwaysBreakTemplateDeclarations: false
21-
BinPackArguments: true
22-
BinPackParameters: true
23-
BraceWrapping:
24-
AfterClass: false
25-
AfterControlStatement: false
26-
AfterEnum: false
27-
AfterFunction: false
28-
AfterNamespace: false
29-
AfterObjCDeclaration: false
30-
AfterStruct: false
31-
AfterUnion: false
32-
BeforeCatch: false
33-
BeforeElse: false
34-
IndentBraces: false
35-
BreakBeforeBinaryOperators: None
36-
BreakBeforeBraces: Attach
37-
BreakBeforeTernaryOperators: true
38-
BreakConstructorInitializersBeforeComma: false
39-
ColumnLimit: 80
40-
CommentPragmas: '^ IWYU pragma:'
41-
ConstructorInitializerAllOnOneLineOrOnePerLine: false
2+
BasedOnStyle: LLVM
3+
AllowShortCaseLabelsOnASingleLine: true
4+
AllowShortFunctionsOnASingleLine: Inline
425
ConstructorInitializerIndentWidth: 2
436
ContinuationIndentWidth: 2
44-
Cpp11BracedListStyle: true
45-
DerivePointerAlignment: false
46-
DisableFormat: false
47-
ExperimentalAutoDetectBinPacking: false
48-
ForEachMacros: [ TAILQ_FOREACH, SPLAY_FOREACH, RB_FOREACH, WITH_MTX_LOCK,
49-
WITH_SPIN_LOCK, WITH_RW_LOCK, SET_FOREACH, LIST_FOREACH,
50-
TAILQ_FOREACH_REVERSE, TAILQ_FOREACH_SAFE,
51-
LIST_FOREACH_SAFE, WITH_VM_MAP_LOCK ]
52-
IncludeCategories:
53-
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
54-
Priority: 2
55-
- Regex: '^(<|"(gtest|isl|json)/)'
56-
Priority: 3
57-
- Regex: '.*'
58-
Priority: 1
7+
IndentCaseBlocks: true
598
IndentCaseLabels: true
60-
IndentWidth: 2
61-
IndentWrappedFunctionNames: false
62-
KeepEmptyLinesAtTheStartOfBlocks: true
63-
MacroBlockBegin: ''
64-
MacroBlockEnd: ''
65-
MaxEmptyLinesToKeep: 1
66-
NamespaceIndentation: None
67-
ObjCBlockIndentWidth: 2
68-
ObjCSpaceAfterProperty: false
69-
ObjCSpaceBeforeProtocolList: true
70-
PenaltyBreakBeforeFirstCallParameter: 19
71-
PenaltyBreakComment: 300
72-
PenaltyBreakFirstLessLess: 120
73-
PenaltyBreakString: 1000
74-
PenaltyExcessCharacter: 1000000
75-
PenaltyReturnTypeOnItsOwnLine: 60
76-
PointerAlignment: Right
77-
ReflowComments: true
78-
SortIncludes: false
79-
SpaceAfterCStyleCast: false
80-
SpaceBeforeAssignmentOperators: true
81-
SpaceBeforeParens: ControlStatements
82-
SpaceInEmptyParentheses: false
83-
SpacesBeforeTrailingComments: 1
84-
SpacesInAngles: false
85-
SpacesInContainerLiterals: true
86-
SpacesInCStyleCastParentheses: false
87-
SpacesInParentheses: false
88-
SpacesInSquareBrackets: false
89-
Standard: Cpp11
90-
TabWidth: 8
91-
UseTab: Never
92-
...
93-
9+
SortIncludes: Never

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
ahxWaves filter=lfs diff=lfs merge=lfs -text
2+
*.akp filter=lfs diff=lfs merge=lfs -text
23
*.bin filter=lfs diff=lfs merge=lfs -text
34
*.BIN filter=lfs diff=lfs merge=lfs -text
45
*.mod filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ gdb-dashboard
1818
*.exe.map
1919
*.rom
2020
*.7z
21+
*.dSYM
2122

2223
# AmigaOS files
2324
*.info

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
TOPDIR = $(realpath .)
22

3-
SUBDIRS = tools lib effects
43
SUBDIRS = tools lib system effects
54
EXTRA-FILES = tags cscope.out
65
CLEAN-FILES = bootloader.bin a500rom.bin addchip.bootblock.bin vbrmove

build/common.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ CONV2D := $(TOPDIR)/tools/conv2d.py
6060
GRADIENT := $(TOPDIR)/tools/gradient.py
6161
TMXCONV := $(TOPDIR)/tools/tmxconv/tmxconv
6262
PCHG2C := $(TOPDIR)/tools/pchg2c/pchg2c
63-
PNG2C := $(TOPDIR)/tools/png2c.py
63+
PNG2C := $(TOPDIR)/tools/png2c/png2c
6464
PSF2C := $(TOPDIR)/tools/psf2c.py
6565
SYNC2C := $(TOPDIR)/tools/sync2c/sync2c
6666
SVG2C := $(TOPDIR)/tools/svg2c/svg2c

build/effect.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ LIBS += libblit libgfx libmisc libc
88
LDEXTRA = $(TOPDIR)/system/system.a
99
LDEXTRA += $(foreach lib,$(LIBS),$(TOPDIR)/lib/$(lib)/$(lib).a)
1010

11-
CRT0 = $(TOPDIR)/system/crt0.o $(TOPDIR)/effects/main.o
11+
CRT0 = $(TOPDIR)/system/crt0.o
12+
MAIN ?= $(TOPDIR)/effects/main.o
1213
BOOTLOADER = $(TOPDIR)/bootloader.bin
1314
ROMSTARTUP = $(TOPDIR)/a500rom.bin
1415
BOOTBLOCK = $(TOPDIR)/addchip.bootblock.bin
@@ -44,7 +45,7 @@ $(TOPDIR)/%.bin: FORCE
4445

4546
include $(TOPDIR)/build/common.mk
4647

47-
$(EFFECT).exe.dbg $(EFFECT).exe: $(CRT0) $(OBJECTS) $(LDEXTRA) $(LDSCRIPT)
48+
$(EFFECT).exe.dbg $(EFFECT).exe: $(CRT0) $(MAIN) $(OBJECTS) $(LDEXTRA) $(LDSCRIPT)
4849
@echo "[LD] $(addprefix $(DIR),$(OBJECTS)) -> $(DIR)$@"
4950
$(LD) $(LDFLAGS) -L$(TOPDIR)/system -T$(LDSCRIPT) -Map=$@.map -o $@ \
5051
--start-group $(filter-out %.lds,$^) --end-group

effects/Config.fs-uae

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ amiga_model = A500
1313
# uae_cpu_model = 68010
1414
# uae_cpu_multiplier = 16
1515
automatic_input_grab = 0
16+
stereo_separation = 0
1617
floppy_drive_speed = 800
1718
# floppy_drive_speed = 100
1819
floppy_drive_volume = 10

effects/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ SUBDIRS := \
1616
flatshade-convex \
1717
floor \
1818
floor-old \
19+
game-of-life \
1920
glitch \
2021
growing-tree \
2122
gui \
@@ -45,6 +46,7 @@ SUBDIRS := \
4546
tilezoomer \
4647
transparency \
4748
twister-rgb \
49+
turmite \
4850
uvlight \
4951
uvmap \
5052
uvmap-rgb \

effects/anim-polygons/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ PNG2C.dancing-pal := --pixmap gradient,16x22x12
66

77
include $(TOPDIR)/build/effect.mk
88

9-
%.c: %.svg
9+
data/%.c: data/%.svg
1010
@echo "[ANIM] $(DIR)$< -> $(DIR)$@"
1111
$(PYTHON3) encode.py $< > $@

effects/anim-polygons/anim-polygons.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#define DEPTH 4
1515

1616
static BitmapT *screen;
17-
static CopInsT *bplptr[DEPTH];
17+
static CopInsPairT *bplptr;
1818
static CopListT *cp;
1919
static short active = 0;
2020
static short maybeSkipFrame = 0;
@@ -25,9 +25,9 @@ static short maybeSkipFrame = 0;
2525
/* Reading polygon data */
2626
static short current_frame = 0;
2727

28-
static void MakeCopperList(CopListT *cp) {
29-
CopInit(cp);
30-
CopSetupBitplanes(cp, bplptr, screen, DEPTH);
28+
static CopListT *MakeCopperList(void) {
29+
CopListT *cp = NewCopList(100 + gradient.height * (gradient.width + 1));
30+
bplptr = CopSetupBitplanes(cp, screen, DEPTH);
3131
{
3232
short *pixels = gradient.pixels;
3333
short i, j;
@@ -37,17 +37,16 @@ static void MakeCopperList(CopListT *cp) {
3737
for (j = 0; j < 16; j++) CopSetColor(cp, j, *pixels++);
3838
}
3939
}
40-
CopEnd(cp);
40+
return CopListFinish(cp);
4141
}
4242

4343
static void Init(void) {
44-
screen = NewBitmap(WIDTH, HEIGHT, DEPTH + 1);
44+
screen = NewBitmap(WIDTH, HEIGHT, DEPTH + 1, BM_CLEAR);
4545
EnableDMA(DMAF_BLITTER);
4646
BitmapClear(screen);
4747

4848
SetupPlayfield(MODE_LORES, DEPTH, X(0), Y(YOFF), WIDTH, HEIGHT);
49-
cp = NewCopList(100 + gradient.height * (gradient.width + 1));
50-
MakeCopperList(cp);
49+
cp = MakeCopperList();
5150
CopListActivate(cp);
5251
EnableDMA(DMAF_RASTER);
5352
}
@@ -127,7 +126,7 @@ static void Render(void) {
127126
while (--n >= 0) {
128127
short i = mod16(active + n + 1 - DEPTH, DEPTH + 1);
129128
if (i < 0) i += DEPTH + 1;
130-
CopInsSet32(bplptr[n], screen->planes[i]);
129+
CopInsSet32(&bplptr[n], screen->planes[i]);
131130
}
132131
}
133132

@@ -136,4 +135,4 @@ static void Render(void) {
136135
maybeSkipFrame = 1;
137136
}
138137

139-
EFFECT(AnimPolygons, NULL, NULL, Init, Kill, Render);
138+
EFFECT(AnimPolygons, NULL, NULL, Init, Kill, Render, NULL);

0 commit comments

Comments
 (0)