Commit Graph

470 Commits

Author SHA1 Message Date
Serge Vakulenko
352d23a073 Merge branch 'master' of https://github.com/RetroBSD/retrobsd 2015-05-15 22:59:54 -07:00
Serge Vakulenko
c054a40805 Fixed bug in tetris. 2015-05-15 22:59:16 -07:00
Serge Vakulenko
23f426ded5 Tetris example modified for cc compatibility. 2015-05-15 22:22:44 -07:00
Serge Vakulenko
bf27d6d5c3 Added tetris and joystick examples. 2015-05-15 22:12:01 -07:00
Sergey
c40136c25d Merge branch 'master' of https://github.com/RetroBSD/retrobsd 2015-05-14 22:52:27 -07:00
Serge Vakulenko
ea03a4bc98 ADM demo rewritten without curses.
Examples reorganized.
Added examples for 37-in-1 sensor kit (not complete yet).
2015-05-14 22:11:47 -07:00
Serge Vakulenko
581ab61262 Fixed bug in gpio driver: /dev/confX device not able to configure the pin mask. 2015-05-14 12:38:04 -07:00
Sergey
f2fe94f32d Register dump fixed. 2015-05-08 22:18:10 -07:00
Serge Vakulenko
ff4a186025 Merge pull request #43 from alexfru/master
Fix issue #40.
2015-04-26 00:22:10 -07:00
Alexey Frunze
d95f161319 Merge remote-tracking branch 'upstream/master' 2015-04-25 20:05:13 -07:00
alex
a20c02c11f Fix issue #40. Properly flush stdio's streams at exit. 2015-04-25 19:49:26 -07:00
Serge Vakulenko
e5e44bfb94 Merge pull request #42 from alexfru/master
Smaller C fixes.
2015-04-25 18:12:46 -07:00
alex
acd1b5da26 Merge branch 'master' of https://github.com/alexfru/retrobsd 2015-04-25 18:05:44 -07:00
alex
a4bdbd4662 Bugfixes
- properly sign-/zero-extend returned values, e.g. the following
function must return 255 and not -1:

unsigned char f(void) { return -1; }

- properly decay arrays on the left side of ->, e.g. the following must
compile:

{
  struct {char c;} s[1];
  s[0].c = 'a'; putchar(s[0].c);
  (s+0)->c = 'b'; putchar(s[0].c);
  (*s).c = 'c'; putchar(s[0].c);
  s->c = 'd'; putchar(s[0].c);
  putchar('\n');
}

Also:
- support structure passing/returning by value (x86 only)
2015-04-25 18:03:55 -07:00
alex
301d069a1a Bugfixes
- properly sign-/zero-extend returned values, e.g. the following
function must return 255 and not -1:

unsigned char f(void) { return -1; }

- properly decay arrays on the left side of ->, e.g. the following must
compile:

{
  struct {char c;} s[1];
  s[0].c = 'a'; putchar(s[0].c);
  (s+0)->c = 'b'; putchar(s[0].c);
  (*s).c = 'c'; putchar(s[0].c);
  s->c = 'd'; putchar(s[0].c);
  putchar('\n');
}
2015-04-25 17:54:17 -07:00
Sergey
9bbe938e48 At startup, set peripheral clock PBCLK as defined by busdiv option
in kernel configuration file.
2015-02-14 20:20:19 -08:00
Sergey
d5c97a9b19 Added bit definitions for OSCCON register.
File machdep.c reindented.
2015-02-14 17:57:48 -08:00
Sergey
0005e7d7bf Fixed bug in fsck: using bcopy() instead of structure assignment.
File exception.c converted to indent4 format.
2015-02-13 21:05:03 -08:00
Sergey
42665ba3b3 SPI bus driver simplified. 2015-02-13 19:48:32 -08:00
Sergey
942bdda5ed Diskspeed: added extra sync and timeout before each test. 2015-02-13 19:41:32 -08:00
Serge Vakulenko
5ce8a8cd33 Added diskspeed utility. 2015-02-12 19:27:59 -08:00
Serge Vakulenko
b3442f28f3 Finalize skel.h. 2015-02-05 19:12:50 -08:00
Serge Vakulenko
29c75b3f71 Skeleton driver completed. 2015-02-05 19:08:53 -08:00
Serge Vakulenko
9b9f6392dc Added a skeleton for character driver. 2015-02-05 19:05:59 -08:00
Serge Vakulenko
f5bbefc222 Fixed indenting in devsw.c. 2015-02-05 18:13:17 -08:00
Serge Vakulenko
7f5ad5d3f8 Using Max32 board with Arduino SD card shield as a default configuration. 2015-02-04 14:28:03 -08:00
Serge Vakulenko
df8f8eaf71 Directory sys/pic32/max32 removed: nobody is using this configuration,
as it required a nonstandard SD card connection.
2015-02-04 14:18:42 -08:00
Serge Vakulenko
f62f70c718 Max32-eth configuration: SD card speed reduced to 10MHz.
Now it works stable with MakerStudio SD card shield.
2015-02-02 22:26:19 -08:00
Serge Vakulenko
1916f8c9da New kernel configuration: chipKIT WF32 board with microSD card on 2.4" LCD TFT display shield.
WF32 board by itself already has a microSD socket.
It's useless for RetroBSD though, as it is not connected to any
of available SPI ports (must use GPIO instead).

Fortunately, a cheap shield is widely available, which adds a microSD slot
connected to SPI2 pins.
2015-01-28 19:14:41 -08:00
Serge Vakulenko
d8269d1996 No more pause on tty output in case of clist overflow. 2015-01-20 18:09:13 -08:00
Serge Vakulenko
8e228dde62 Fixed bug in fsutil: incorrect positioning of partition superblock. 2015-01-06 19:47:31 -08:00
Serge Vakulenko
bae12383a0 Fixed build issues on Linux x86-64. 2015-01-06 19:36:49 -08:00
Serge Vakulenko
8e2c046406 Merge pull request #41 from alexfru/master
SmallerC: generate smaller & faster code; bugfixes
2014-12-29 20:06:10 -08:00
alex
dad5247184 Merge branch 'master' of https://github.com/alexfru/retrobsd 2014-12-29 16:36:58 -08:00
alex
b1f67fbca0 SmallerC: generate smaller & faster code; bugfixes
Improvements:
- use registers more efficiently
- eliminate some register copies and stack manipulations
- promote left operands to right immediate operands
- improve simple assignments to auto/static vars
- use bltz, blez, bgtz, bgez
- change mul/divu (by powers of 2) to sll/srl/and
- use seb, seh for sign extension instead of sll/sra
- overall generate a bit tighter, faster and more readable asm code

Fixes:
- >>= should be unsigned when the left operand is unsigned int.
The right operand isn't important here.
- very subtle bug in e.g. void f(){int a; &a+1;/*wrong value of &a+1*/}

Other:
- include stdarg.c and skeleton.c in /share/example/Makefile
2014-12-29 16:28:56 -08:00
Serge Vakulenko
f76ab8417c Merge pull request #39 from alexfru/master
Smaller C: Fix >>=
2014-12-13 01:19:36 -08:00
Alexey Frunze
3bb914c8b4 Fix >>=
>>= should be unsigned when the left operand is unsigned int. The right
operand isn't important here.
2014-12-13 01:06:53 -08:00
Serge Vakulenko
8b099bcf76 Merge pull request #38 from alexfru/master
Correct sd card image name.
2014-12-07 21:58:35 -08:00
Alexey Frunze
2fc41d34cf Correct sd card image name. 2014-12-07 21:51:06 -08:00
Serge Vakulenko
2301571ecb Merge pull request #37 from alexfru/master
Smaller C fixes and improvements.
2014-12-06 16:38:56 -08:00
alex
00269e9387 Smaller C fixes and improvements:
- move va_list type detection under #ifdef as it's rarely needed anyway
- allow up to 254 characters in a string literal
- generate a warning when an integer is passed instead of a pointer (and
vice versa) as a function parameter (pass -Wall for this)
- when printing an unexpected token, print identifier tokens instead of
'<tokIdent>'
- fix: allow most control characters inside '' and ""
- fix handling of -I<path> and -SI<path>
- switch() now supports Duff's device
- for() now supports declarations in its first clause as in C99/C++
2014-12-06 16:18:17 -08:00
Serge Vakulenko
687695d0db Fixed missing .profile at top level. 2014-10-23 19:08:11 -07:00
Serge Vakulenko
0aa5e1c462 README updated. 2014-10-21 11:28:22 -07:00
Serge Vakulenko
3a7cde7974 Merge pull request #36 from alexfru/master
Smaller C: Fix MIPS code generation for -= and postfix --. Also convert most of Small C sample programs to Smaller C.
2014-10-21 00:16:19 -07:00
alex
f57cc446b0 Remove no longer applicable comment. 2014-10-19 00:53:29 -07:00
alex
1a55933faf Merge branch 'master' of https://github.com/alexfru/retrobsd 2014-10-19 00:25:23 -07:00
alex
b18ce0aa87 Fix MIPS code generation for -= and postfix --.
Also convert most of Small C sample programs to Smaller C.
2014-10-19 00:22:44 -07:00
alex
5bbf8d4e73 Fix MIPS code generation for -= and postfix --.
Convert most of Small C sample programs to Smaller C.
2014-10-19 00:13:00 -07:00
Sergey
7aa774702b Fubarino configuration modified to use Arduino-compatible bootloader. 2014-10-04 14:30:21 -07:00
Sergey
64430a0f91 Added comfiguration for Majenko SDXL board.
DIP and Pinguino-micro boards removed - nobody uses these.
Deleted unused linker scripts.
2014-10-04 13:57:03 -07:00