1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-05 21:29:03 +00:00
Commit Graph

2742 Commits

Author SHA1 Message Date
Stefan
c4baf9588e
directive removed 2017-11-21 10:29:35 +01:00
Stefan
f8f464846a
directive removed 2017-11-21 10:27:08 +01:00
Stefan
55117039f0
Merge pull request #3 from polluks/polluks-sv-joy
Added standard joystick driver for the Supervision.
2017-11-21 06:59:55 +01:00
Stefan
949c2aa76f
Add files via upload 2017-11-21 06:57:02 +01:00
Stefan
12bfed04b1
Create supervision-stdjoy.s 2017-11-21 06:53:26 +01:00
jede
4e0958eae6 Bug corrected : Fwrite did not return number of byte written. 2017-11-14 22:04:57 +01:00
Oliver Schmidt
06794b221d Made cbm_k_untlk() available. 2017-11-13 20:38:41 +01:00
Oliver Schmidt
0f87844a7c
Merge pull request #519 from jedeoric/master
[Telestrat] mkdir is now available
2017-11-11 21:09:59 +00:00
Fabrizio Caruso
0a61b061c7
Update gamate-stdjoy.s 2017-11-09 16:42:52 +01:00
Fabrizio Caruso
bf0ae22969
Update gamate-stdjoy.s 2017-11-09 16:36:06 +01:00
U-AMAIISDOM\fcaruso
e4a235b233 Correct bits in gamate joystick detection 2017-11-09 13:51:04 +01:00
Piotr Fusik
84edf4cbfd Fix more than 256 codes of same length.
Fix all 256 literal codes of same length.
2017-11-07 20:10:19 +01:00
Piotr Fusik
d3451bb299 Fix 256 codes of same length 2017-11-06 19:46:26 +01:00
Stefan
9ee4431994
Add files via upload
Alternative joystick interface
2017-11-02 21:11:08 +01:00
jede
807b55862d Now mkdir is working 2017-10-28 00:37:47 +02:00
Oliver Schmidt
15d9373ad7 Merge pull request #507 from jedeoric/master
[telestrat] tgi_line & tgi_outtext are available, toascii.s added, doc updated
2017-10-25 14:49:14 +00:00
jede
3bc0843afc FIX label for setpixelmode 2017-10-23 23:25:08 +02:00
jede
aaf8863de5 Merge branch 'master' of https://github.com/jedeoric/cc65 2017-10-23 23:04:22 +02:00
jede
1403d797f0 Remove toascii.s 2017-10-23 20:52:22 +02:00
Oliver Schmidt
c0ce20e9cc Save/restore jmpvec as it is used by generated code - see g_callind(). 2017-10-23 18:57:28 +02:00
Oliver Schmidt
bd9b4ef60c Replaced three (logically) identical files with a single file. 2017-10-23 18:35:06 +02:00
jede
0517a2c2ab removing extra spaces 2017-10-22 23:12:12 +02:00
jedeoric
af1c7f0c8b Merge branch 'master' into master 2017-10-22 23:11:18 +02:00
jede
93f202850a toascii.s added, doc updated, tgi_line & tgi_outtext are available 2017-10-22 23:06:56 +02:00
Oliver Schmidt
4da1d3232f Merge pull request #504 from jedeoric/master
[Telestrat] TGI initialization,  some bugs (clrscr) correction, cgetc optimization, irq management
2017-10-22 11:14:55 +00:00
jede
351a5ab20a Now setPixel works in TGI. 2017-10-20 21:03:30 +02:00
jede
f964fdbe56 Correction : authors 2017-10-16 18:18:36 +02:00
jede
195b5f0a07 Optimizing (from Polluks tip) 2017-10-16 18:15:53 +02:00
jede
18c94e123f tgi_clear, tgi_init, tgi_done, tgi_getmaxx, tgi_getmaxy are working 2017-10-16 18:08:48 +02:00
jede
7b74264720 irq.s added 2017-10-16 17:34:32 +02:00
jede
db1319de4c clrscr.s switch to text mode 2017-10-16 17:28:00 +02:00
Oliver Schmidt
820b4dbc77 Merge pull request #503 from jedeoric/master
[telestrat] cgetc is now available
2017-10-08 17:56:04 +00:00
jede
a01c8c238c Correcting comments 2017-10-08 18:14:26 +02:00
jede
ff12835ee2 Adding cgetc 2017-10-08 18:11:09 +02:00
Christian Groessler
a084ea8e42 Atari: split "setcursor" function out of cgetc.s source file into setcursor.s.
This function is used by many other CONIO functions, and the user program not
necessarily uses 'cgetc'. Having "setcursor" in a different object file saves
space in this case and also allows the user program to override it (e.g. when
not using GRAPHICS 0 mode).
2017-10-03 21:58:52 +02:00
jede
56360ea054 optimize 2017-10-02 12:20:52 +02:00
jede
a1c8860f63 telestrat : cgetc add for conio 2017-10-01 23:23:03 +02:00
Oliver Schmidt
3a6430b13d Merge pull request #494 from jedeoric/master
[telestrat] Adding some vars, adding getcwd management, changing ZP address and ZP length
2017-09-27 09:52:19 +02:00
jede
d8904c550b Fixing buffer overflow with cwd command (FILENAME_MAX must be at 50 +1 bytes) 2017-09-25 21:39:57 +02:00
jede
86741cb1dd correcting missing _ 2017-09-24 20:07:02 +02:00
jede
5bbb27c8af Fixing bug for cwd 2017-09-24 20:04:50 +02:00
jede
fabb6acf3f Initcwd is now working for telestrat 2017-09-24 19:23:44 +02:00
Oliver Schmidt
308f74561c Merge pull request #482 from greg-king5/pet-kbrepeat
Make the CBM Pet kbrepeat() work on both 40-/80-column machines.
2017-09-06 09:19:04 +02:00
Greg King
51765c6e5c Removed an unwanted button mask table from a VIC-20 joystick driver.
It had put the jump table at the wrong place.  Programs crashed as soon as they tried to initiate the driver.
2017-09-05 16:56:20 -04:00
Greg King
3c0b8c4e86 Made the CBM Pet kbrepeat() work on both 40-column and 80-column machines.
Put the kbrepeat() description in an alphabetical position in the function document.
2017-09-05 09:19:01 -04:00
Oliver Schmidt
4aa19494f5 Removed dysfunctional kbrepeatdelay() and kbrepeatrate().
As discussed in https://github.com/cc65/cc65/pull/452 after my premature merge the two functions in question don't work as expected.

Additionally I adjusted several style deviations in the pull request in question.
2017-08-30 16:37:59 +02:00
Oliver Schmidt
acf831658f Adjusted to recent driver interface change.
Please note that this change is absolutely untested!

Apart from the recent driver interface change:
- vic20-stdjoy.s was "slightly broken" because it didn't clear x on return from joy_read.
- vic20-ptvjoy.s was "heavily broken" because it returned a totally different set of bits of the first joystick.
2017-08-20 17:17:39 +02:00
Oliver Schmidt
20c85c8a1c Minor style adjustment. 2017-08-20 17:17:38 +02:00
Oliver Schmidt
a817da7c6b Adjusted to recent driver interface change.
Please note that this change is absolutely untested!
2017-08-20 17:17:37 +02:00
Oliver Schmidt
b5a4e5667a Merge pull request #452 from mrdudz/kbrepeat
kbrepeatdelay and kbrepeatrate for cbm targets
2017-08-20 14:15:37 +02:00
Oliver Schmidt
0c54a19a0b Adjusted to recent driver interface change.
The change is inspired by the code of the standard joystick driver. It is however absolutely untested.

Note: Sites like http://raster.atariportal.cz/english.htm state that there needs to be a delay when reading joysticks via the MultiJoy adapter. There's no such delay in the driver. But I don't dare to decide to add it.
2017-08-20 11:49:02 +02: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
Bob Andrews
5dcebbccb6 Merge branch 'master' into kbrepeat 2017-08-06 20:22:52 +02:00
Pascal de Bruijn
19f6ae1d54 make: change uppercase prefix var 2017-07-22 16:38:50 +02:00
Oliver Schmidt
6002e59c28 Merge pull request #453 from mrdudz/waitvsync
waitvblank for cbm targets
2017-07-18 15:38:27 +02:00
mrdudz
b6d3d32e88 wait for line 0 instead of last line 2017-07-18 01:06:20 +02:00
mrdudz
8eee51913a add headers/fix formatting 2017-07-18 01:04:53 +02:00
mrdudz
c24080f289 do banking 2017-07-18 00:41:54 +02:00
mrdudz
fe850fece8 implement waitvsync for plus4/c16 2017-07-17 23:55:18 +02:00
mrdudz
1abce3a2a1 rename all waitvblank() to waitvsync() 2017-07-17 23:15:05 +02:00
Oliver Schmidt
26a2d8a5c6 Merge pull request #457 from pfusik/const-arrays
Make some arrays const.
2017-06-30 09:28:40 +02:00
Greg King
141c25b42b Added the extra dependency file's directory as an order-only prerequisite.
The extra dependency files are put into different places than the extra object files' location.  Therefore, the rule must pre-make two directories.
2017-06-29 13:56:29 -04:00
Piotr Fusik
b31ae57be1 Make some arrays const. 2017-06-28 20:43:31 +02:00
Greg King
d1501731e4 Added a makefile dependency for the libraries' "extra" files.
Some of the files in "libsrc/*/extra/" include other library files.  But, the "lib/*.o" files weren't rebuilt when those other files changed.

The new dependency rules must be "bootstrapped".  You must force a rebuild of all of the extra library object files (it will create the dependency files).  Use these commands:

rm lib/*.o
make lib
2017-06-28 05:51:46 -04:00
Greg King
bd883327ac Added two functions that make it easier to write portable programs for Ohio Scientific computers. 2017-06-26 02:34:23 -04:00
mrdudz
3ff4a1333c use BIT so akku wont get trashed at least in 40 cols mode 2017-06-22 00:19:39 +02:00
mrdudz
49aad01bf1 dont trash akku if possible, use VDC register when in 80column mode 2017-06-21 23:18:00 +02:00
mrdudz
a42feca228 fixed some stuff, compiles again :) 2017-06-17 02:37:34 +02:00
mrdudz
035621aa95 fixed code a bit so it compiles again :) 2017-06-17 02:26:54 +02:00
Greg King
30f941ba39 Added a missing label to some conio cursor movement functions.
It had prevented other functions, e.g. cputs(), from being linked into a program.
2017-06-15 16:44:46 -04:00
Lauri Kasanen
4235e569d2 Small lz4 optimizations 2017-06-09 16:57:47 +03:00
Lauri Kasanen
c444ed5e4f Mention the optimizations in a comment 2017-06-09 10:42:24 +03:00
Lauri Kasanen
bba961e54d Use hex immediates 2017-06-09 10:40:17 +03:00
Lauri Kasanen
cd460a8160 Remove _ from internal vars 2017-06-09 10:37:50 +03:00
Lauri Kasanen
ee49ecdf43 Expand tabs to spaces in lz4.s 2017-06-06 19:31:16 +03:00
Lauri Kasanen
e75a59d7a8 Add LZ4 decompression support 2017-06-06 18:48:25 +03:00
Oliver Schmidt
035baa49bd Merge pull request #438 from bbbradsmith/ca65_rand_comment
rand.s comment update
2017-05-26 15:16:42 +02:00
Brad Smith
950d65e8ed detectabl > detectable 2017-05-25 03:20:11 -04:00
Brad Smith
1602aab6e9 forgot to update comments from earlier #323 rand.s change 2017-05-25 03:01:25 -04:00
Stefan
75028e4108 shorter code 2017-05-18 23:58:10 +02:00
Lauri Kasanen
a84463a3df callptr4 2017-05-01 21:08:03 +03:00
Oliver Schmidt
e43dbe1c24 Just some white space fixes of recently contributed code. 2017-04-06 17:53:57 +02:00
Oliver Schmidt
275b27647e Removed superfluous final linefeed. 2017-04-04 15:43:56 +02:00
Oliver Schmidt
233dd5062a Merge pull request #389 from IrgendwerA8/stringimprovements
Optimization of string functions (size & speed).
2017-04-04 15:39:37 +02:00
Oliver Schmidt
5095dd72b2 Merge pull request #402 from IrgendwerA8/runtime_improvements
few 6502 and some 65SC02 runtime optimizations
2017-03-20 11:34:06 +01:00
IrgendwerA8
1abfa98290 minor style changes 2017-03-19 20:51:54 +01:00
Oliver Schmidt
2048d6cfb5 Removed top blank line. 2017-03-18 20:57:12 +01:00
Christian Groessler
a3d8829be9 Creativison changes.
This change includes some cleanups, removal of mainargs.s (game console
programs never have arguments), and a workaround for a problem I'm seeing.

The problem is that sometimes (in fact, more often than not) the clrscr()
call in testcode/lib/joy-test.c writes some garbage chars on the screen (most
often a "P"). Could be my hardware (I haven't seen it on MAME), but to
me the root cause is still unknown.
2017-03-17 21:42:51 +01:00
IrgendwerA8
0de44517ac few 6502 and some 65SC02 optimizations 2017-03-12 23:21:43 +01:00
Christian Groessler
8a81f9c0c8 Fix line endings (CRLF -> LF) on all affected files. 2017-03-10 11:21:14 +01:00
Oliver Schmidt
b332064cb5 Just some minor style fix. 2017-03-09 14:39:08 +01:00
Christian Groessler
64c4cef901 Implement diagonal direction handling in creativision joystick driver. 2017-03-08 13:19:53 +01:00
IrgendwerA8
8d1b80e6fd Fixed CPU-flag usage which fails on build server?! 2017-03-05 11:38:55 +01:00
IrgendwerA8
81115aa826 Added further optimizations and unit tests. 2017-03-05 02:09:12 +01:00
Christian Groessler
9558ebf86c creativision/crt0.s: enable display interrupts in display controller configuration
Otherwise the joystick zero page locations won't get updated.
2017-03-04 10:04:32 +01:00
IrgendwerA8
3d28f5ca90 Fixed indentation 2017-02-26 22:36:19 +01:00
IrgendwerA8
c240d42a9e Added "strrchr" optimizaion a matching unit test and tiny unit test framework. (Documentation for that will follow later) 2017-02-26 20:03:05 +01:00
jede
b0e035ba2b Cleaning 2017-02-25 22:23:46 +01:00
jede
7bc3bff83f adding gotox.s gotoy.s wherex.s wherey.s 2017-02-25 22:20:17 +01:00
jede
1497330cc0 adding clrscr.s 2017-02-25 22:10:13 +01:00
jede
f6002a149c adding gotoxy.s 2017-02-25 21:32:06 +01:00
IrgendwerA8
6afcc370ed Optimization of two string functions (size & speed). 2017-02-25 20:19:50 +01:00
Christian Groessler
ddae920ee9 remove old joystick code 2017-02-15 15:53:57 +01:00
Christian Groessler
e6530d68dd Fix joystick driver. Add interruptor support.
Note that the joystick driver doesn't support combined movements (like
left/up or right/down). This should be fixed.
2017-02-15 15:45:49 +01:00
Christian Groessler
c0803ed53a fix indentation 2017-02-14 23:52:44 +01:00
Christian Groessler
a5fba551d1 Merge remote-tracking branch 'upstream/master' into something_to_pull2 2017-02-13 21:38:38 +01:00
Piotr Fusik
4266e712f2 Optimize inflatemem.
The new version is 30% shorter and 10% faster.
It also avoids the indirect-X addressing mode, which was a problem for PC-Engine.
2017-02-12 11:41:11 +01:00
Oliver Schmidt
5bbf010029 Merge pull request #371 from jedeoric/master
Create an Oric Telestrat target library
2017-02-10 23:47:13 +01:00
Christian Groessler
38451fa8a4 intermediate check-in -- creativision joystick driver 2017-02-08 14:34:35 +01:00
Greg King
69e3bbea7e Reverted 'Used more mundane addressing in some of the instructions in "zlib/inflatemem.s".'
This reverted some of commit e7e65044e6.
2017-02-07 07:33:27 -05:00
Christian Groessler
984f901604 Merge remote-tracking branch 'upstream/master' into something_to_pull2 2017-02-06 19:32:00 +01:00
Christian Groessler
39a1a142e3 gamate, lynx, nes, pce: remove joy_stddrv.s
These targets don't support dynamically loaded joystick drivers.
2017-02-06 19:26:12 +01:00
jede
d2fc2c74fb Correcting scrsize.s into _scrsize.s 2017-02-03 21:11:37 +01:00
jede
d76911d38a Fixing telestrat.h 2017-02-02 22:53:28 +01:00
jede
5abb40b229 Last push for tonight :) 2017-02-02 00:11:11 +01:00
jede
4b77072fed Correcting alignment 2017-02-02 00:05:50 +01:00
jede
0e649f24ea Correcting some code from github comments 2017-02-01 23:58:33 +01:00
Christian Groessler
a08f905224 Cleanups for Creativision. 2017-02-01 20:09:03 +01:00
Christian Groessler
0b2a699b46 Merge remote-tracking branch 'upstream/master' into creativision-neu 2017-02-01 18:49:31 +01:00
Christian Groessler
07f840f11c Merge remote-tracking branch 'upstream/master' into creativision 2017-02-01 18:15:05 +01:00
Christian Groessler
034c668b15 pce/memcpy.s: remove superfluous comma in comment 2017-02-01 17:52:30 +01:00
jede
d9778994fa Correcting some spaces 2017-01-31 22:33:19 +01:00
jede
6f58b9a22d Correcting comments alignment
Correcting an address error in telestrat.inc when cleaning files which broke read.s primitive
2017-01-31 22:20:19 +01:00
jede
b5fef66f37 Merge telemon24 and telemon30 into telestrat target.
Cleaning, and replace tab to spaces
Converting hex lowercase value into uppercase char.
Changing := and = when it was needed
2017-01-31 22:09:14 +01:00
jede
06b2b83ab2 Correcting spaces 2017-01-29 23:18:32 +01:00
jede
29881fb7c9 Revert 2017-01-29 22:28:54 +01:00
jede
d1b5a6632d Adding telemon30 and telemon24 primitives 2017-01-29 21:18:49 +01:00
Christian Groessler
bba7c980e4 libsrc/c16/get_tv.s: remove code duplication
Use the plus4 version of get_tv.s.
2017-01-26 16:43:47 +01:00
Christian Groessler
f613ee0f57 More optimization in libsrc/atari/is_cmdline_dos.s.
Suggestion by Spiro Trikaliotis.
2017-01-24 21:01:42 +01:00
Christian Groessler
6f463d60a3 Small space optimization in libsrc/atari/is_cmdline_dos.s. 2017-01-24 20:21:56 +01:00
jede
038ac5a65a Correcting doc adding telemon 2.4 primitives 2017-01-22 21:41:49 +01:00
Greg King
54ff808c2c Added a way to show the default mouse pointer on C64 TGI (graphics) screens. 2017-01-18 16:05:47 -05:00
Florent Flament
c1aac0de0e Add C support for Atari 2600 (VCS) 2017-01-13 21:12:22 +01:00
jede
d5ba063602 Correcting some bugs 2017-01-04 20:03:19 +01:00
Marshall Ward
09495519c0 NES memory map amend (16k prg, 8k chr default)
The configuration file and runtime (crt0.s) provided for the default NES
ROM layout (2x16k PRG, 8k CHR) incorrectly added interrupts (IRQ1, IRQ2,
TIMERIRQ) which are not supported by the NES hardware.  For example, see
the NESdev wiki, which makes no reference to these interrupts.

    https://wiki.nesdev.com/w/index.php/CPU_memory_map

The VECTORS region was also incorrectly set to 0xFFF6, which would have
left the 0xFFF4 normally unspecified.  This did not result in any error,
however, since cc65 simply placed ROMV directly after ROM0 regardless of
start address.

(This layout may be due to a copy-and-paste from the PC-Engine
configuration, whose interrupt registers start at 0xFFF6, begins with
the three interrupts listed above, followed by NMI and START, and does
not end with a final IRQ interrupt.)

Despite the absence of any actual error, since START is still placed at
0xFFFC, this patch removes the nonexistent interrupts and also correctly
aligns the ROM0 and ROMV regions.  It also has the (admittedly very
minor) benefit of freeing up 6 additional bytes for ROM0.
2016-12-24 08:32:54 +11:00
jede
15ac85b50c Adding ch376.h header, correcting some bugs 2016-12-14 23:45:20 +01:00
jede
252e4afb9c Adding files for telemon30 2016-12-14 21:22:10 +01:00
Oliver Schmidt
819ecbda26 Merge pull request #348 from SvOlli/release
ca65: added .P4510 and .IFP4510 pseudo commands
2016-09-20 16:19:45 +02:00
Oliver Schmidt
709ee6a28b Merge pull request #341 from alexthissen/master
Update exehdr.s for Lynx target
2016-09-14 10:23:44 +02:00
Christian Groessler
6198e10f67 Atari: fix lookup of default device on XDOS.
Stefan Dorndorf, author of XDOS, pointed out that retrieving the
default device by looking at an undocumented memory location won't
work in future XDOS versions.
He also showed a way to get the default device in a compatible
manner.

This change implements his method and adds a version check (XDOS
versions below 2.4 don't support this -- for them the behaviour
will be the same as, for example, AtariDOS: no notion of a default
drive).
2016-09-12 23:40:25 +02:00
Alex Thissen
ef7e9db116 Changed __BLOCKSIZE__ to __BANK0BLOCKSIZE__.
Added __BANK1BLOCKSIZE__ which defaults to 0.
2016-09-11 22:26:52 +02:00
Sven Oliver Moll
c0d2643952 added 4510 cpu detection to getcpu.s 2016-09-07 19:44:11 +02:00
alexthissen
e786d1cf49 Update exehdr.s
Fix for memory bank 1 which should be zero for almost all cartridges for emulators to work correctly.
2016-08-27 21:58:13 +02:00
Greg King
2c03b9a1bc Added C-code interfaces for the CBM Kernal functions SCNKEY and UDTIM. 2016-08-07 15:50:10 -04:00
Greg King
e7e65044e6 Used more mundane addressing in some of the instructions in "zlib/inflatemem.s".
That avoids conflicts with ca65's future .setdp feature.
2016-07-19 10:42:49 -04:00
Brad Smith
32d000fb4c Fix broken rand() implementation. The high 8 bits were unused, reducing it to a 24-bit implementation (while still doing all the work for a 32-bit one). The best entropy is in the unused high byte, returning these bits in A instead of bits 8-15, which had considerably lower entropy (i.e. rand() & 255 was effectively a 16-bit LCG). 2016-07-11 20:48:47 -04:00
Greg King
c2945bf1ff Made the zlib's inflatemem()'s source file use enhanced instructions for all 65SC02-compatible CPUs (not only the 65C02). 2016-07-10 05:05:38 -04:00
Oliver Schmidt
e47485f925 Added CONIO cursor support.
For quite some time I deliberately didn't add cursor support to the Apple II CONIO imöplementation. I consider it inappropriate to increase the size of cgetc() unduly for a rather seldom used feature.

There's no hardware cursor on the Apple II so displaying a cursor during keyboard input means reading the character stored at the cursor location, writing the cursor character, reading the keyboard and finally writing back the character read initially.

The naive approach is to reuse the part of cputc() that determines the memory location of the character at the cursor position in order to read the character stored there. However that means to add at least one additional JSR / RTS pair to cputc() adding 4 bytes and 12 cycles :-( Apart from that this approach means still a "too" large cgetc().

The approach implemented instead is to include all functionality required by cgetc() into cputc() - which is to read the current character before writing a new one. This may seem surprising at first glance but an LDA(),Y / TAX sequence adds only 3 bytes and 7 cycles so it cheaper than the JSR / RTS pair and allows to brings down the code increase in cgetc() down to a reasonable value.

However so far the internal cputc() code in question saved the X register. Now it uses the X register to return the old character present before writing the new character for cgetc(). This requires some rather small adjustments in other functions using that internal cputc() code.
2016-06-19 15:03:20 +02:00
Greg King
f91a7e749b Fixed the Plus/4 joystick driver.
It chooses a stick correctly.  And, it reads the fire button.
2016-06-18 13:18:26 -04:00
Christian Groessler
a9c69bb8c9 A small rearrangement of instructions in Atari's exec() to let the comments
make sense again.
2016-06-16 00:47:13 +02:00
Christian Groessler
ec7751332f Fix exec() for atarixl target.
The final part of exec() called 'excexit' and only then restored the
stack pointer to its value at program entry.  'excexit' does all
cleanup (the same as '_exit()'), which means that on the atarixl
target the ROM is banked in again.  On big programs the 'SP_save'
variable might reside at a high memory address which is no longer
accessible after the ROM has been banked in.
The change just moves the restoration of the stack pointer before
the call to 'excexit'.

Another change lets exec.s compile if UCASE_FILENAME is not defined.
And some other small cleanups, also in open.s.
2016-06-15 23:52:16 +02:00
Oliver Schmidt
2c8b8d90bf Merge pull request #311 from groessler/something_to_pull
Fix doesclrscrafterexit() function on atarixl target.
2016-06-15 08:59:50 +02:00
Christian Groessler
d0faf471b8 Some improvements to Atari exec() after review. 2016-06-14 20:44:57 +02:00
Christian Groessler
4aa9a414c6 Fix doesclrscrafterexit() function on atarixl target.
On atarixl, the screen is always cleared, regardless of the running DOS.
2016-06-13 21:16:27 +02:00
Christian Groessler
94ba9575ec Implement exec() for Atari XDOS.
- Adds new ENOEXEC error code, also used by Apple2 targets.
- Maximum command line length is 40, incl. program name. This is
  an XDOS restriction.
- testcode/lib/tinyshell.c has been extended to be able to run
  programs.
2016-06-13 20:40:01 +02:00
Oliver Schmidt
2f486b6201 Merge pull request #307 from groessler/something_to_pull2
Add Atari version of of doesclrscrafterexit().
2016-06-07 15:13:28 +02:00
Christian Groessler
5705d0b55b Use 'return0' for default 'doesclrscrafterexit()' implementation in libsrc/common.
Fix include/atari.h formatting.
2016-06-07 15:05:00 +02:00
Christian Groessler
346d88a6a7 Add issues from pull request #307. 2016-06-07 12:07:38 +02:00
Christian Groessler
c7874b9f60 Add Atari version of of doesclrscrafterexit().
- Update documentation.
- Update atari.h and apple2.h header files.
- Adapt Atari test/target programs.
- Fix a typo in "div" entry in funcref.sgml.
2016-06-07 00:42:51 +02:00
Christian Groessler
27841c7b40 Some Atari runtime library fixes.
* libsrc/atari/ucase_fn.s: Fix handling if input parameter 'tmp2' is 0.
* libsrc/atari/open.s: Set 'tmp2' parameter for 'ucase_fn' if DEFAULT_DEVICE
  is not defined.
2016-06-06 22:45:20 +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
d670998814 Added Apple II version of doesclrscrafterexit().
The prototype and documentation is supposed to be provided together with the ATARI version.
2016-06-05 13:01:42 +02:00
Oliver Schmidt
89329f1519 Merge pull request #287 from silverdr/target_goodies
moved output of target utils and drivers to separate directory
2016-06-01 11:01:56 +02:00
Oliver Schmidt
f1a052f259 Merge pull request #303 from groessler/something_to_pull
Atari: get current drive on XDOS
2016-05-31 12:47:11 +02:00
Christian Groessler
0114a850d9 Atari, getdefdev.s: use mnemonics for 'crvec'. 2016-05-31 12:24:21 +02:00
Christian Groessler
4d02d47832 Use atexit() to wait for key press at program ternination.
Idea by polluks.
2016-05-31 10:38:02 +02:00
Christian Groessler
c1f17e9c18 Atari: make __getdefdev function ROM-friendly 2016-05-31 09:28:53 +02:00
Christian Groessler
9523fa2d33 Atari: get current drive on XDOS 2016-05-31 07:37:58 +02:00
Patrycjusz R. Łogiewa
4dcfc036c8 samples zip and install targets moved into samples/Makefile as agreed 2016-05-30 17:42:01 +02:00
Oliver Schmidt
b979fb5763 Minor adjustment to recent change. 2016-05-30 14:31:53 +02:00
Christian Groessler
a6c306500a Small optimization in apple2 exec.s. 2016-05-30 14:16:37 +02:00
Patrycjusz R. Łogiewa
e36a636eee Indenting optimised 2016-05-29 16:34:22 +02:00
Patrycjusz R. Łogiewa
ac5bb6707d Post-review changes 2016-05-29 16:19:03 +02:00
Christian Groessler
b3d7c09ba1 forgot to add the new file atari/is_cmdline_dos.s in my last commit... 2016-05-25 01:06:53 +02:00
Christian Groessler
da65866e24 Atari: add new function '_is_cmdline_dos()' and some other small changes.
- use this function instead of directly looking at _dos_type in the included
  targetutil and test programs
- fixes/improvements to the Atari runtime library regarding the recently
  changed _dos_type values
- libsrc/atari/targetutil/w2cas.c: exit if no filename was entered
- add documentation for the new function
2016-05-25 00:57:43 +02:00
Christian Groessler
6d7dfad80b add support for XDOS command lines 2016-05-24 03:06:00 +02:00
Patrycjusz R. Łogiewa
cc747946b2 removed variable usage 2016-05-16 22:35:24 +02:00
Patrycjusz R. Łogiewa
37f9929094 adapted for zip/install targets 2016-05-16 22:14:05 +02:00
Patrycjusz R. Łogiewa
ba10c74a7a directory structure changed from driver-centric to target-centric 2016-05-16 19:49:43 +02:00
OzHawk
1369bed881 Update kernal.s 2016-05-16 08:41:13 +09:30
Patrycjusz R. Łogiewa
93f55c274b moved output of target utils and drivers to separate directory 2016-05-13 14:28:58 +02:00
OzHawk
8bd2628d1e Update the missing entries in the kernel jump table for the Vic20 with the actual function addresses.
The Vic20 does not have kernal table entries for the following functions.

;-----------------------------------------------------------------------------
; Functions which are not in the kernal jump table for VIC-20 but are for C64

CINT        := $E518
IOINIT      := $FDF9
RAMTAS      := $FD8D

All other kernal entries are the same as the C64, however, without this change, the startup code fails.

Without this change the vic20.lib builds incorrectly.
2016-05-11 19:24:16 +09:30
Oliver Schmidt
f103617512 Use .macpack to include macro package. 2016-03-27 18:29:45 +02:00
Oliver Schmidt
e92f354740 Made use of recently added Apple scrcode macro. 2016-03-27 18:27:53 +02:00
Oliver Schmidt
c0e82f4200 Merge pull request #279 from greg-king5/atmos-reconfig
Convert the Atmos configuration to the new constructor segment model.
2016-03-27 00:36:05 +01:00
Oliver Schmidt
29d1400340 Allow _sys() to call ROM routines.
_sys() is supposed to be (primarily) intended to call ROM routines. Leveraging the "file overlay" mechanism of the cc65 build system allows to provide a Apple II specific _sys() implementation that temporarily switches in the ROM.
2016-03-25 21:57:06 +01:00
Greg King
7773fcb1e1 Converted the Atmos configuration to the new constructor segment model. 2016-03-18 11:28:56 -04:00
Oliver Schmidt
e3cbc7e8b8 Moved run location of ONCE segment.
Make the same changes to the Apple II that were done with 0ee9b2e446 to the C64.

Notes:
- The startup code deliberately doesn't make use of symbols defined for the LC segment as that segment is optional.
- The <...>-asm.cfg configs move the segment BSS to an own memory area BSS although this doesn't seem necessary. However the benefit is that the size of the memeory area MAIN is identical to the number of bytes loaded from disk into RAM. To keep this an invariant for all Apple II configs allows to simplify the EXEHDR to just refer to the symbols defined for MAIN.
2016-03-17 21:07:19 +01:00
Oliver Schmidt
1d1ba3ed3b Adjusted constructors.
The constructors are _NOT_ allowed anymore to access the BSS. Rather they must use the DATA segment or the INIT segment. The latter isn't cleared at any point so the constructors may use it to expose values to the main program. However they must make sure to always write the values as they are not pre-initialized.
2016-03-16 16:28:32 +01:00
Oliver Schmidt
a2c9cb021a Moved things into ONCE.
Code and or data used only during initialization belongs into the ONCE segment.
2016-03-15 22:55:36 +01:00
Oliver Schmidt
56a8c69b14 Use AX paradigm. 2016-03-13 21:23:45 +01:00
Oliver Schmidt
a3a22733f8 Cleaned up C64 linker configs.
The BSS segment and the ONCE segment share the same start address. So they need to be placed in two different memory areas.

So far BSS was placed in the MAIN memory area and ONCE was placed in an additional memory area. Both memory areas were written to the output file. They just "happened" to be loadable and runnable at a stretch.

Now ONCE is placed in the MAIN memory area and BSS is placed in an additional memory area. Only MAIN is written to the output file. It becomes more obvious that BSS is "just" defined to share memory with ONCE.
2016-03-13 14:32:07 +01:00
Oliver Schmidt
084453ba57 Don't presume the stack size to be a multiple of pages. 2016-03-10 10:07:09 +01:00
Oliver Schmidt
69fbcb30fd Use AX paradigm for stack initalization. 2016-03-07 01:44:19 +01:00
Oliver Schmidt
d8c31cf1d3 Renamed RAM to MAIN for all disk based targets.
The name RAM doesn't make much sense in general for a memeory area because i.e. the zero page is for sure RAM but is not part of the memory area named RAM.

For disk based targets it makes sense to put the disk file more into focus and here MAIN means the main part of the file - in contrast to some header.

Only for ROM based targets the name RAM is kept as it makes sense to focus on the difference between RAM and ROM.
2016-03-07 01:28:55 +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
mrdudz
eb96a90e5f initial import from old sources 2016-02-28 22:35:46 +01:00
mrdudz
85760e0c53 initial import from old sources 2016-02-28 22:13:05 +01:00
Oliver Schmidt
3d08abcfa8 Load INITBSS segment from disk.
Conceptually the INITBSS segment is not initialized in any way. Therefore it makes sense to not load it from disk. However the INIT segment has to be loaded from disk and therefore moved to its run location above the INITBSS segment. The necessary move routine increases runtime RAM usage :-(

Therefore we now "unnecessarily" load the INITBSS segment from disk too meaning that the INIT segment is loaded at its run location. Therefore there's no need for the move routine anymore.

After all we trade disk space for (runtime) RAM space - an easy decision ;-)

Notes:

- The code allowing to re-run a program without re-load present so far could not have worked as far as I can see as it only avoided to re-run the move routine but still tried to re-run the code in the INIT segment that was clobbered by zeroing the BSS. Therefore I removed the code in question altogether. I'm personally not into this "dirty re-run" but if someone wants to add an actually working solution I won't block that.

- INITBSS is intentionally not just merged with the DATA segment as ROM-based targets can't reuse the INIT segment for the BSS and therefore have no reason to place the INIT segment above INITBSS.

- Because ROM-based targets don't copy INITBSS from the ROM (like it is done with the DATA segment) all users of INITBSS _MUST_NOT_ presume INITBSS to be initialized with zeros!
2016-02-28 19:45:36 +01:00
Oliver Schmidt
54e09fdd03 Added basic frame for new target 'creativision'.
Kym Greenshields <kym.greenshields@gmail.com> has expressed interest
in contributing and maintaining support for the VTech CreatiVision system.

this resembles commit 8e6b8dd0af from oliver
2016-02-28 19:05:40 +01:00