1
0
mirror of https://github.com/cc65/cc65.git synced 2026-03-10 17:21:49 +00:00
Commit Graph

3655 Commits

Author SHA1 Message Date
Konstantin
8202b520b2 add Agat to samples 2025-06-13 12:51:41 +03:00
Konstantin
c28bafa581 add chline, cvline functions 2025-06-13 12:50:39 +03:00
Konstantin
1e80269c6b Add comment about why AppleSingle header is needed 2025-06-09 21:14:01 +03:00
Konstantin
41a82f7165 fix codestyle 2025-06-08 23:20:21 +03:00
Konstantin
1a109c0b34 Fix codestyle 2025-06-07 12:36:49 +03:00
Konstantin
5ff18c1ebc Updates 2025-06-04 23:11:13 +03:00
Konstantin
de524a6561 Initial Agat support 2025-06-04 22:51:17 +03:00
Colin Leroy-Mira
0122307399 Apple2: Dynamic IIe check on a2_lo_tgi 2025-06-01 12:53:36 +02:00
Colin Leroy-Mira
a9ab23ad51 Make waitvsync available on apple2 2025-06-01 12:53:36 +02:00
Colin Leroy-Mira
d3ef3e1b62 Apple2: Don't depend on apple2enh definition for characters
Up, Down and Del, as well as Open-Apple, exist on
non-enhanced Apple //e.
2025-05-31 19:43:53 +02:00
Colin Leroy-Mira
c75c305c59 Apple2: Fix inconsistency (use bit like everywhere else) 2025-05-31 15:43:23 +02:00
Colin Leroy-Mira
d03529067a Apple2: don't define _allow_lowercase and uppercasemask on APPLE2ENH 2025-05-31 15:42:02 +02:00
Colin Leroy-Mira
89daccaa43 Apple2: automatically enable lowercase starting from //e 2025-05-31 15:42:02 +02:00
Colin Leroy-Mira
f8c51ffd3d Spare a few bytes 2025-05-31 12:04:47 +02:00
Colin Leroy-Mira
e444f4c40e Apple2: Safely check for 80-columns card
Check the Pascal ID bytes for an 80-columns card
to avoid blindly jumping into a $C300 that could be
totally unrelated.
2025-05-27 23:38:56 +02:00
Colin Leroy-Mira
816666615b Apple2: Make 80-columns support dynamic on apple2 target
Add a machinetype identifier to help us quickly identify
Apple //e (bit 7) and //e enhanced (bit 6).

Use it in conio functions for 80-columns code instead of
relying entirely on the __APPLE2ENH__ target.

Move videomode() to the apple2 target, and have it return
an error if 80-columns hardware is not available - this
is a lie for now, it is considered available on //e enhanced,
which may not be true, and not available on //e, which
may also be not true. An ulterior patch will make that
check correctly.

Adapt the box/line drawing characters so that one can use
MouseText on the apple2 target if it is available, by
defining DYN_DRAW_BOX. No change by default: MouseText is
considered available on apple2enh and not available on
apple2.
2025-05-27 19:03:20 +02:00
Colin Leroy-Mira
cd92e4f0af Apple2: Set mousecard IRQ rate when possible 2025-05-26 14:58:13 +02:00
Bob Andrews
3b089b715a Merge pull request #2485 from SvenMichaelKlose/add_plus4_getin_wrapper
Add Plus/4 wrapper for KERNAL's GETIN.
2025-05-25 03:58:00 +02:00
Bob Andrews
0d9ae7cb70 Update kgetin.s
use symbol from cbm_kernal.inc
2025-05-25 03:44:36 +02:00
mrdudz
e9a15af29b cleanup/fix pce cpeekc/cpeekcolor/cpeekrevers/cpeeks, replaces #532 2025-05-25 02:52:03 +02:00
mrdudz
5c72deb0b9 prepare osic1p cpeekc/cpeekcolor/cpeekrevers, replaces #532 2025-05-25 01:38:32 +02:00
mrdudz
8d42c4a8c5 fix cpeekc/cpeekcolor/cpeekrevers/cpeeks for atmos, replaces what is in #532 2025-05-24 20:03:44 +02:00
mrdudz
228316ff58 NES complete now (tested and conio test updated), replaces what is in #532 2025-05-24 19:19:49 +02:00
mrdudz
6628c4ff43 fix cpeekc/cpeekcolor/cpeekrevers for atari 800 2025-05-24 18:34:44 +02:00
mrdudz
0d5e365ee3 Merge branch 'master' into coniopeek 2025-05-24 17:52:58 +02:00
Bob Andrews
7621fb91f0 Merge pull request #2642 from GorillaSapiens/ca65_charset_translations
C style character translation in ca65
2025-05-24 17:23:19 +02:00
Bob Andrews
40d6b45d30 Merge pull request #2652 from pfusik/opt-crc32
zlib: Make crc32 8 bytes shorter and 3 cycles/byte faster
2025-05-24 17:13:56 +02:00
Bob Andrews
333ac4b383 Merge pull request #2651 from colinleroy/add-decompressors
Add ZX02 and LZSA (1,2) decompressors
2025-05-24 16:54:05 +02:00
John Murkerson
9cdba1b6d8 Fix Atari buffer overrun on keyboard EOF 2025-05-15 20:45:40 -04:00
Piotr Fusik
13ddd6392c zlib: Make crc32 8 bytes shorter and 3 cycles/byte faster 2025-05-14 15:15:32 +02:00
Colin Leroy-Mira
cfbfaa559c Add ZX02 and LZSA (1,2) decompressors 2025-05-13 21:26:47 +02:00
Jimmy Dansbo
d4a37f7777 Changed tabs to spaces 2025-05-06 09:16:12 +02:00
Jimmy Dansbo
c5a3dbdf38 Add additional video modes that were added in ROM Pre Release 43 2025-05-06 09:09:07 +02:00
Gorilla Sapiens
1b85ab6985 C style character translation in ca65 2025-05-06 03:02:18 +00:00
Bob Andrews
b1713e4c96 Merge pull request #2627 from colinleroy/add-lz4-C-ref
Add decompress_lz4 C implementation as comment
2025-05-02 20:23:09 +02:00
Colin Leroy-Mira
2085646e57 Apple2: implement get_tv()
get_tv() will return TV_NTSC or TV_PAL for any Apple II model
with a way of checking vblank. For Apple ][ and ][+ it will
return TV_OTHER and let the user figure it out in another way.
2025-04-28 11:58:53 +02:00
Christian Groessler
5cb1bc60fc Add 'define=yes' for INIT segment to atari-asm.cfg and atari-asm-xex.cfg linker configs.
libsrc/atari/exehdr.s: Add (empty) INIT segment to cover assembler programs which link with
exehdr.s.
2025-04-09 22:51:11 +02:00
Colin Leroy-Mira
caa66aea95 Add decompress_lz4 C implementation as comment
For reference.
2025-04-07 21:01:05 +02:00
Stefan
5ceb4f0d68 Revert atr5200std.s 2025-03-24 21:27:55 +01:00
Stefan A. Haubenthal
774e275965 Fixed many comments 2025-03-24 20:52:55 +01:00
Colin Leroy-Mira
fb63a839bf Optimize LZ4 decompressor
Use a walking out pointer instead of &out[written]. This
simplifies the code by 27 bytes and spares 15% cycles.
Tested with both the unit test and code uncompressing
10kB of data.

Renamed the labels for legibility.
2025-03-14 16:33:13 +01:00
Oliver Schmidt
ee540678e6 Improved consistency of notation for return value promotion. 2025-03-13 22:22:28 +01:00
Oliver Schmidt
3edb959298 Finally made CONIO and STDIO fully interoperable in 80 column mode.
In order to avoid undefined behaviour of programs not aware of 80 column mode, the 80 column firmware deliberately doesn't use CH but OURCH. So in order to be fully interoperable, CONIO needs to do the same. This changes introduces that behavior. So far so good.
But the 80 column firmware can also be active in 40 column mode. This scenario is not detectable with reasonable effort. Therefore the behaviour of CONIO in this scenario is _not_ improved. However, this scenario is supposed to be very uncommon - and a recent update to videomode() makes sure to not activate it anymore ourselves.
Notes:
* If a program wants to be 100% sure to not run in 40 column mode with 80 column firmware active it can call videomode(VIDEOMODE_40COL) to explicitly deactivate a potentially active 80 column firmware. However, this always implicitly clears the screen.
* In 40 column mode (contrast to 80 column mode) the 80 column firmware updates CH to reflect OURCH. So as long as CONIO only reads CH, but doesn't update it, everything works as expected. Interestingly this makes a rather useful scenario of STDIO/CONIO interoperation work: Using STDIO for screen output and CONIO for keyboard input. When cgetc() is called after cursor(1), it has to write to the screen as there's no hardware cursor on the Apple II. Those writes work as expected even in 40 column mode with active 80 column firmware as CH is only read but not written.
2025-03-13 22:22:28 +01:00
Oliver Schmidt
7c2671be2a Disable interrupts during aux memory access.
Interrupt handlers rather likely access text screen holes. Especially MSLOT is obligatory for every interrupt handler that requires access to an extension ROM ($C800-$CFFE) in order to be able to re-enable the extension ROM that was enabled when the interrupt occured. Those text screen holes only hold valid values in main memory so interrupts must be disabled while the aux memory text screen is mapped.
2025-03-13 22:22:28 +01:00
Oliver Schmidt
fd4c1e193d Completely disable/enable 80 column firmware.
The //e 80 column firmware allows to switch between 80 and 40 clumns without clearing the screen. So far, I made that feature available via videomode(). However thinking about it once more, I don't see a C program making use of it. A C program rather benefits from the consistent behavior of videomode() always clearing the screen.
Apart from that, the (default) 40 column display and the 40 column display with 80 column firmware active, behave differently (CH vs. OURCH) which causes subtile issues. Those issues can be avoid altogether by simply always deactivating the 80 column firmware when switching from 80 column display to 40 column display.
Of course, those issues are also relevant, if the 40 column display with 80 column firmware is already active when the C program starts. However, I have reasons to believe that running the Apple II in that mode was/is very unpopular.
2025-03-13 22:22:28 +01:00
Colin Leroy-Mira
c8eb6e2dd5 Apple II: Document BLTU alternative 2025-03-09 16:19:42 +01:00
Colin Leroy-Mira
020fe4028a Fix RANGE ERROR STOPPED AT 8214
On a 48k Apple II, the BLTU2 call throws an error,
even when there is nothing to copy in the LC segment.

Add an alternative LC copy, based on memcpy, to an
extra file that the user can link in as with iobuf-0800.

This memcpy-based version allows our programs to run on
Integer ROM apple2. It costs 21 bytes in binary size,
plus memcpy (60 bytes in binary size + RAM use) if it
wasn't already linked in.
2025-03-06 15:55:10 +01:00
Christian Groessler
02470a2343 atari5200: fix conio screen initialization
Screen memory clearing was wrong, now uses _clrscr function.
2025-03-04 23:41:30 +01:00
Christian Groessler
16224cdd36 atari5200: fix _clrscr to use correct screen size
Could be different than default when linking with atari5200-conioscreen-20x12.o.
2025-03-04 23:07:13 +01:00
Christian Groessler
b0220e5456 fix problem in _get_tv for GEOS CBM
Found by mkslack, see #2046
2025-03-02 09:26:31 +01:00