Commit Graph

50 Commits

Author SHA1 Message Date
mrdudz ffa83c32a4 clean-up of driver return codes 2023-02-26 20:03:41 +01:00
mrdudz 89c08dc6d4 extra underscores for _randomize and _swap 2022-08-29 20:52:35 +02:00
mrdudz f8f901b05e remove dangling spaces 2022-04-17 16:06:22 +02:00
Christian Groessler 681c9594cc libsrc/atari5200/crt0.s: fix formatting 2021-05-21 01:45:55 +02:00
polluks2 b1f81d5e21 Optimised code 2021-05-08 19:48:31 +02:00
Polluks 9563541870 crt0 clean-up 2020-11-29 18:08:33 +01:00
Christian Groessler 3537210674 add waitvsync() for atari and atari5200 2020-10-28 21:12:32 +01:00
Oliver Schmidt f723147f04 Streamlined clock rate handling.
* Docs say that CLK_TCK is an obsolete alias of CLOCKS_PER_SEC so there's no point in individual definitions.
* All targets determining the clock rate at runtime can use a common handling.
2020-10-25 14:06:44 +01:00
Christian Groessler 03311e7268 atari5200: update docs for recent conio changes
also renames libsrc/atari5200/extra/conioscreen_20x12.s to
libsrc/atari5200/extra/conioscreen-20x12.s to be in line with
other optional link modules
2019-04-13 11:07:06 +02:00
Christian Groessler 78daf84f12 atari5200: name conio constructor 'initconio' 2019-04-12 12:49:38 +02:00
Christian Groessler e1e6bec9ff atari5200: changes from discussions in #870
- rename screen_setup to initconio
- use Greg King's version of bgcolor()
2019-04-12 12:49:38 +02:00
Christian Groessler d7eecb57f8 atari5200: get rid of conio_colors table
use system color variables instead; improve testcode/lib/atari5200/hello.c
test program
2019-04-12 12:49:38 +02:00
Christian Groessler be6bba66a9 atari5200: conio now uses just four colors altogether
See discussion in PR #870.
2019-04-12 12:49:38 +02:00
Christian Groessler 79b9a8d2df atari5200: add screensize function 2019-04-12 12:49:38 +02:00
Christian Groessler db01036e2e atari5200: add alternative conio screen (20x12 resolution) 2019-04-12 12:49:38 +02:00
Christian Groessler ec5e38617a atari5200: implement bgcolor() and textcolor()
Includes some other small fixes/cleanups.
2019-04-12 12:49:38 +02:00
IrgendwerA8 3d8c3a4948 Code review adaptations, removed "cc65_" prefix from functions 2019-03-29 22:53:04 +01:00
IrgendwerA8 db8bd84a82 Changes due to code review. 2019-03-29 22:53:04 +01:00
IrgendwerA8 399250a105 Optimized mul20 & mul40 and extracted to new library. 2019-03-29 22:53:04 +01:00
Christian Groessler d199ca1460 Atari, Atari5200: disable "attract mode" on mouse or joystick input
Fixes #736.
2018-09-05 11:23:12 +02:00
Christian Groessler 2d4210b309 Atari5200 joystick driver: enable POT input.
The "Atari800" emulator doesn't emulate this aspect, therefore the problem
wasn't noticed before.
2018-08-24 17:04:31 +02:00
Oliver Schmidt 1976d6cd32 Removed IRQ support from joystick drivers.
All but one joystick drivers didn't use IRQs. Espsecially when the joystick driver kernel was the only .interruptor this meant quite some unnecessary overhead because it pulled in the whole IRQ infrastructure.

I was told that the one driver using IRQs (the DXS/HIT-4 Player joystick driver for the C64) can be reworked to not do it. Until this is done that driver is defunct.
2018-02-01 22:38:36 +01:00
Christian Groessler 643152fb38 Fix last change, put display list at beginning of ROM. 2018-01-21 15:40:22 +01:00
Christian Groessler 2ef6514e47 atari5200: put default display list into its own memory area
This avoids 1K boundary crossing of the display list. Fix for issue #560.
2018-01-19 15:18:43 +01:00
Oliver Schmidt 7f52a770d9 Removed joy_masks array.
So far the joy_masks array allowed several joystick drivers for a single target to each have different joy_read return values. However this meant that every call to joy_read implied an additional joy_masks lookup to post-process the return value.

Given that almost all targets only come with a single joystick driver this seems an inappropriate overhead. Therefore now the target header files contain constants matching the return value of the joy_read of the joystick driver(s) on that target.

If there indeed are several joystick drivers for a single target they must agree on a common return value for joy_read. In some cases this was alredy the case as there's a "natural" return value for joy_read. However a few joystick drivers need to be adjusted. This may cause some overhead inside the driver. But that is for sure smaller than the overhead introduced by the joy_masks lookup before.

!!! ToDo !!!

The following three joystick drivers become broken with this commit and need to be adjusted:
- atrmj8.s
- c64-numpad.s
- vic20-stdjoy.s
2017-08-19 19:11:28 +02:00
Oliver Schmidt 13482984ca Introduced internal gotoxy that pops both parameters.
About all CONIO functions offering a <...>xy variant call
  popa
  _gotoxy

By providing an internal gotoxy variant that starts with a popa all those CONIO function can be shortened by 3 bytes. As soon as program calls more than one CONIO function this means an overall code size reduction.
2016-06-05 14:58:38 +02:00
Oliver Schmidt f103617512 Use .macpack to include macro package. 2016-03-27 18:29:45 +02:00
Oliver Schmidt 69fbcb30fd Use AX paradigm for stack initalization. 2016-03-07 01:44:19 +01:00
Oliver Schmidt 419eb700b5 Renamed INITBSS to INIT and INIT to ONCE.
The way we want to use the INITBSS segment - and especially the fact that it won't have the type bss on all ROM based targets - means that the name INITBSS is misleading. After all INIT is the best name from my perspective as it serves several purposes and therefore needs a rather generic name.

Unfortunately this means that the current INIT segment needs to be renamed too. Looking for a short (ideally 4 letter) name I came up with ONCE as it contains all code (and data) accessed only once during initialization.
2016-03-06 21:27:19 +01:00
Oliver Schmidt 326da85145 Consistently place constructors (and their exclusive subroutines) in "INIT". 2015-10-09 21:44:20 +02:00
Greg King c7969a78b0 Refined the comments in the target start-up files.
Fixed typo errors.  Made the comments consistent across all those files.
2014-08-24 10:10:20 -04:00
Oliver Schmidt 2c975d3642 Create static drivers directly from source files.
Up to now static drivers were created via co65 from dynamic drivers. However there was an issue with that approach:

The dynamic drivers are "o65 simple files" which obligates that they start with the 'code' segment. However dynamic drivers need to start with the module header - which is written to. For dynamic drivers this isn't more than a conceptual issue because they are always contain a 'data' segment and may therefore only be loaded into writable memory.

However when dynamic drivers are converted to static drivers using co65 then that issue becomes a real problem as then the 'code' segment may end up in non-writable memory - and thus writing to the module header fails.

Instead of changing the way dynamic drivers work I opted to rather make static driver creation totally independent from dynamic drivers. This allows to place the module header in the 'data' segment (see 'module.mac').
2014-06-04 23:50:18 +02:00
Christian Groessler fa7cdf0214 remove atari5200.mac 2014-05-30 13:38:29 +02:00
Christian Groessler f54ef4efe4 provide CLK_TCK and CLOCKS_PER_SEC values for atari5200 2014-05-29 13:23:45 +02:00
Christian Groessler 4286e55453 fix build error 2014-05-29 01:50:41 +02:00
Christian Groessler 245a69a043 don't use scrcode for numbers 2014-05-29 00:18:22 +02:00
Christian Groessler 0bcb615d33 remove TABs 2014-05-28 23:39:31 +02:00
Christian Groessler 8c5aebef81 cleanups and add comments 2014-05-28 23:38:22 +02:00
Christian Groessler 98195a516e check trigger button (TRIGx); correctly report joystick count depending
on 5200 console version
2014-05-28 00:35:49 +02:00
Christian Groessler b6f712ef58 not a dummy implementation anymore... 2014-05-27 01:47:37 +02:00
Christian Groessler 0f2f19ef5b some CONIO fixes 2014-05-16 02:10:19 +02:00
Christian Groessler 8cb68071cd clrscr for Atari 5200 default conio screen 2014-05-12 03:05:21 +02:00
Christian Groessler 82544b8678 add joystick driver -- trigger buttons are not queried yet 2014-05-12 03:03:44 +02:00
Christian Groessler 1532ad6792 add dummy irq.s 2014-05-12 03:02:17 +02:00
Christian Groessler 92b32d7d0e atari5200 update: simple conio "hello world" works now 2014-04-25 03:02:44 +02:00
Christian Groessler 30b418c734 add gotox, gotoy, and gotoxy 2014-03-13 02:38:35 +01:00
Christian Groessler 84c655a907 use __RESERVED_MEMORY__ to reserve memory for the default 20x24 text screen 2014-03-13 02:36:10 +01:00
Christian Groessler 889783bedb add some conio functions 2014-03-11 01:17:59 +01:00
Christian Groessler 361da29e51 add get_tv() 2014-03-04 16:02:24 +01:00
Christian Groessler c8f7f2f161 first changes for atari5200 target 2014-03-01 17:20:09 +01:00