Weeble
f5c816d215
(screen.c) Fix sprite draw at screen edge
...
Problem - Sprites can be drawn at X/Y coordinates >= 0xfff9 to appear
partially over the left/upper screen boundary. But the dirty-rectangle
calculation doesn't account for this, so these updates will only appear
on the screen if something *else* dirties this area of the screen. This
can be observed in /projects/examples/devices/screen.tal where these
edges of the screen show stale content.
Solution - Detect wrapping and expand the dirty rectangle appropriately.
Change screen_change to take Uint16 to make sure values are truncated to
the intended range. Ignore changes that are fully off the screen.
2023-06-29 07:41:42 -07:00
Sevan Janiyan
305b8469b0
Use the correct definition to obtain snprintf(3)
...
At some point snprintf(3) prototype became guarded off in stdio.h.
Defining _C99_SOURCE makes it visible.
On legacy Darwin, such a guard was not present so the definition
has no impact on the build, but on "modern" macos it has the desired
effect.
Build tested on OS X 10.4 and macos 10.15.
2023-05-15 08:32:48 -07:00
Devine Lu Linvega
09d9990a62
(screen) Fixes warnings
2023-05-04 20:45:52 -07:00
Devine Lu Linvega
77edd1dbbf
(screen) Renamed pixels attr to layer
2023-05-04 20:32:44 -07:00
Devine Lu Linvega
d80885ee22
(screen) Housekeeping
2023-05-04 20:17:38 -07:00
Devine Lu Linvega
98bd2a7849
(screen) Use uxn_screen global
2023-05-04 17:43:44 -07:00
Devine Lu Linvega
9416a0e813
Removed layer struct
2023-05-04 11:33:31 -07:00
Devine Lu Linvega
8f98281d89
(screen) Only repaint changed pixels
2023-05-04 11:15:16 -07:00
Devine Lu Linvega
83ba7e05ea
Added mock behavior for the friend port
2023-05-02 10:31:33 -07:00
Matus Laslofi
d2e054346f
Declare snprintf to fix builds on macOS
...
For some reason on macOS, the functions `snprintf` and `vsnprintf` are
not in the X/Open 5 (ANSI C89) standard but rather in the X/Open
6 (ISO C99). A simplest solution seems to be to declaring the missing
functions before using them, which is what I did here. Another option
is to use the C99 standard with `#define _XOPEN_SOURCE 600`, which
seems to be an overkill for such a niche issue.
Quoting from the STANDARDS section in `man 3 snprintf` on macOS:
> ...the snprintf() and vsnprintf() functions conform to ISO/IEC
> 9899:1999 (“ISO C99”)...
2023-05-01 09:27:49 -07:00
Devine Lu Linvega
0da70d6bd1
Allow tiny sizes for the screen
2023-04-26 12:01:45 -07:00
Devine Lu Linvega
3038d5c40b
(console) Use 0x00 for no-queue
2023-04-17 11:27:54 -07:00
Devine Lu Linvega
98282cb1a6
Moved error printing to system.c
2023-04-17 11:03:11 -07:00
Devine Lu Linvega
9a882a64c7
(uxnemu) Write arguments end in console device
2023-04-17 10:41:03 -07:00
Devine Lu Linvega
fbba9b304d
(console) Implemented 0x17 port with stream type based on design by zzo38
2023-04-16 21:13:50 -07:00
Devine Lu Linvega
25cc4a1329
(screen.tal) Improved screen testing rom
2023-04-14 19:51:05 -07:00
Devine Lu Linvega
99874908e4
(screen.c) Skip blit when color is 0
2023-04-14 10:19:57 -07:00
Devine Lu Linvega
0f75b123a4
(screen) sprite address wrapping
2023-04-14 10:05:15 -07:00
Devine Lu Linvega
04554dd1d3
(screen.c) Reduced number of variables indirections
2023-04-14 09:51:50 -07:00
Devine Lu Linvega
b6e6839d25
(screen.c) Removed pixel function
2023-04-13 21:57:17 -07:00
Devine Lu Linvega
d0db4f9223
(screen.c) Improved readability of the code
2023-04-13 21:33:16 -07:00
Devine Lu Linvega
891204610a
Fixed issue with screen/fill layer
2023-04-13 09:58:09 -07:00
Devine Lu Linvega
2acc7edb6f
Added comment for blending LUT
2023-04-13 09:53:05 -07:00
Devine Lu Linvega
d043ce633d
(screen.c) Faster drawing of pixel
2023-04-13 09:42:59 -07:00
Devine Lu Linvega
a44dbd9696
(screen.c) Merge all checks
2023-04-12 20:00:17 -07:00
Devine Lu Linvega
8aae16a9d0
(screen) Removed clamp function
2023-04-12 19:20:11 -07:00
Devine Lu Linvega
540847694e
Removed screen_wipe
2023-04-12 14:35:48 -07:00
Devine Lu Linvega
be138f5952
Removed FIXED_SIZE flag
2023-04-12 12:22:17 -07:00
Devine Lu Linvega
11e9b635c8
Removed mono mode to screen
2023-04-12 11:58:32 -07:00
Devine Lu Linvega
344c5c9904
Added flip-x/flip-y to pixel fill mode
2023-04-11 11:31:36 -07:00
Devine Lu Linvega
07e8306616
(screen) Created static fill function
2023-04-11 11:11:12 -07:00
Devine Lu Linvega
24dbc7d5f8
(screen) Rename screen_clear to screen_fill
2023-04-11 10:42:32 -07:00
Devine Lu Linvega
3973bc2ab8
Made the uxn stacks private again
2023-04-11 10:14:29 -07:00
Devine Lu Linvega
eaf7d095ec
(system.c) The debug port will always print the stacks, even if empty
2023-04-06 17:50:03 -07:00
Devine Lu Linvega
8b43d0d7ae
Removed redundant pixel param from screen routines
2023-03-27 08:38:54 -07:00
Sigrid Solveig Haflínudóttir
37afbc25fb
file: sprintf → snprintf
2023-03-20 16:58:45 +01:00
Devine Lu Linvega
e386c3aeaa
Fixed issue with Windows builds
2023-03-19 14:12:14 -07:00
Deadly Headshot
05fd9771ca
A more elegant solution to the Windows bugs in filepaths and MinGW compilation
2023-03-19 14:11:42 -07:00
Devine Lu Linvega
4e77d3d5ae
Renamed PEEK16/POKE16 to PEEK2/POKE2
2023-03-12 15:25:52 -07:00
Sigrid Solveig Haflínudóttir
8420c81d52
system.h: no need to redefine the same macro
2023-03-12 02:39:20 +01:00
Devine Lu Linvega
aeceaf75bf
Removed file dei event
2023-03-03 21:04:26 -08:00
Devine Lu Linvega
96a19b4887
Merge branch 'main' of git.sr.ht:~rabbits/uxn
2023-03-01 11:31:10 -08:00
Devine Lu Linvega
dae025af20
Date and Screen devices DEI do no need device ptr
2023-03-01 11:28:14 -08:00
Andrew Alderwick
d12b948e82
Remove unitialised memory.
2023-03-01 19:23:13 +00:00
Devine Lu Linvega
abd7ab403e
Removed POKDEV
2023-03-01 10:53:44 -08:00
Devine Lu Linvega
486a60b1bd
Removed PEKDEV macro
2023-03-01 10:49:25 -08:00
Devine Lu Linvega
53f3c18dcf
Removed GETVEC macro
2023-03-01 10:42:03 -08:00
Devine Lu Linvega
87de244d37
Replaced some macros
2023-03-01 10:35:42 -08:00
Devine Lu Linvega
18de47cc1c
Fixed issue with out-of-screen painting
2023-02-28 21:54:52 -08:00
Devine Lu Linvega
bd01e71c35
Sprite wipe helper
2023-02-28 20:54:32 -08:00
Devine Lu Linvega
5709511c7e
(screen.c) Do not shift a zero in 1bpp
2023-02-28 19:34:13 -08:00
Devine Lu Linvega
3818720eb2
Removed opacity lut
2023-02-28 17:00:21 -08:00
Andrew Alderwick
f07775a9a2
(file device) Fix buffer overflow.
2023-02-17 21:39:14 +00:00
Devine Lu Linvega
60080d8fe8
(file device)Add / suffix to folder names
2023-02-17 10:08:00 -08:00
Devine Lu Linvega
9f4e85b1b3
Named arguments in system_cmd
2023-02-02 10:40:47 -08:00
Devine Lu Linvega
36a70ed605
Protect system_cmd from reading out of bounds
2023-02-02 10:20:19 -08:00
Devine Lu Linvega
33d6ef8cd2
Reversed arguments in system loader
2023-02-02 09:35:05 -08:00
Devine Lu Linvega
0dcc3b4c2e
Simplified system_cmd
2023-01-31 09:49:32 -08:00
Devine Lu Linvega
e20b572c20
Moved all system memory functions into system.c
2023-01-31 09:38:06 -08:00
Andrew Alderwick
5538e539d2
Minor optimisation.
2023-01-31 17:11:54 +00:00
Andrew Alderwick
9d9d094e6a
Bare minimum changes to get Windows builds running again.
2023-01-31 17:05:01 +00:00
Devine Lu Linvega
0aa4aeff41
Load rom in chunks of 64kb
2023-01-28 18:38:37 -08:00
Devine Lu Linvega
390ae8138a
Extend loaded rom size
2023-01-28 15:05:24 -08:00
Devine Lu Linvega
fd84ff44d7
Initial draft for MMU
2023-01-28 14:45:31 -08:00
Devine Lu Linvega
fad574816d
Removed errcode from stacks
2023-01-12 20:35:42 -08:00
Andrew Alderwick
5cacb3f241
Fix macOS build.
2023-01-02 15:23:28 +00:00
Andrew Alderwick
d94a84bc93
Port Audio to new devices scheme.
2023-01-02 15:01:55 +00:00
Andrew Alderwick
c2b0667496
Update Copyright years.
2023-01-02 14:40:23 +00:00
Devine Lu Linvega
5ac6ff4313
All devices but audio ported to new devices scheme
2023-01-01 16:13:34 -08:00
Devine Lu Linvega
bf4ee03d27
Ported screen to new device
2023-01-01 13:34:20 -08:00
Devine Lu Linvega
7afe1f39c7
Screen device is half ported to new device handlers
2023-01-01 13:19:40 -08:00
Devine Lu Linvega
68d706be25
Will connect devices to devold while I migrate to new router
2023-01-01 12:12:59 -08:00
Devine Lu Linvega
9aefeebf25
Removed Device struct from controller device
2023-01-01 11:37:34 -08:00
Devine Lu Linvega
062bbac37d
Removed Device struct from mouse device
2023-01-01 11:31:14 -08:00
Devine Lu Linvega
24285d1d5d
Fixed issue with monochromatic
2022-09-15 11:12:57 -07:00
Devine Lu Linvega
ac6e4fed10
Toggle monochromatic mode
2022-09-15 09:11:20 -07:00
Andrew Alderwick
a35ef6b242
Fix build warning on Windows.
2022-04-09 11:37:06 +01:00
Andrew Alderwick
47f65c7b82
(uxncli) Load ROM using the File device functions.
2022-03-28 18:51:29 +01:00
Andrew Alderwick
42dea5b914
Replace file_i_deo and file_i_dei.
2022-03-28 18:16:44 +01:00
neauoire
c4f7483027
Arranged include order
2022-03-27 09:18:02 -07:00
Andrew Alderwick
0e7ebb69e6
(uxnemu) Interrupt infinite loops with an error.
2022-03-27 13:53:25 +01:00
Andrew Alderwick
f2c644f680
Move DateTime to 0xc0, add second File to 0xb0.
2022-03-26 17:54:29 +00:00
Andrew Alderwick
7ce8cc1d24
Add file reading with .File/read DEI(2).
2022-03-17 19:09:34 +00:00
Andrew Alderwick
205cc89bcb
Keep a local copy of File/name; don't try to read it beyond end of RAM.
2022-03-17 18:41:55 +00:00
Andrew Alderwick
27089a77e4
Prepare for more than one File device.
2022-03-17 18:35:49 +00:00
Andrew Alderwick
bca73244f0
Minor fix to audio.c.
2022-03-17 18:29:44 +00:00
Andrew Alderwick
a3b87e021f
Rename file_deo variables.
2022-03-17 17:08:03 +00:00
Andrew Alderwick
5dcf0a2b35
Make the UxnAudio struct private to audio.c.
2022-03-17 16:59:36 +00:00
Andrew Alderwick
1d694c43ea
Fix sprite address check.
2022-03-06 20:39:27 +00:00
Andrew Alderwick
314dd5a431
screen/auto: Replace draft looping with block width control.
2022-03-06 18:02:34 +00:00
Andrew Alderwick
1b04e0814b
(draft) Add looping functionality to Screen/auto.
2022-03-06 13:42:59 +00:00
Andrew Alderwick
055fa9bcd0
Close some security holes.
2022-01-23 23:17:54 +00:00
Andrew Alderwick
deace3b79a
Remove old debugging support.
2022-01-23 19:35:18 +00:00
Andrew Alderwick
fbd9c49f84
Fix resize when only width or height are set.
2022-01-20 01:34:44 +00:00
Andrew Alderwick
d186b7a038
Perform resizing of SDL screen during redraw.
2022-01-20 01:24:22 +00:00
Andrew Alderwick
cd0ca2eb17
Move clamp() to screen.c.
2022-01-20 01:24:20 +00:00
Andrew Alderwick
2c47425c41
Remove trailing space in stack printing
2022-01-14 07:59:42 +00:00
neauoire
4ea8cc2819
Removed extra specing around bytes in stack printing
2022-01-13 14:52:37 -08:00
neauoire
b48db8278f
(monospace.tal) Added a 8x8 label drawing example
2022-01-13 10:25:31 -08:00
neauoire
f1cc022e9b
Uxncli now uses the system_inspect
2022-01-13 08:34:32 -08:00