1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 13:28:05 +11:00
Commit Graph

334 Commits

Author SHA1 Message Date
Virgil Dupras
2fa88176c0 VE: don't emit chars higher than 0x7f
Uninitialized blocks often contains garbage, and emitting it on
the TRS-80 4P results in serious visual glitches.
2020-12-22 18:34:03 -05:00
Virgil Dupras
8992cdbbf6 tools: add "blkdown" tool
When developing from a Collapse OS environment, it's necessary to
be able to download blocks from it.
2020-12-21 17:02:36 -05:00
Virgil Dupras
45fbce4eb9 tools/blkunpack: add "upto" argument 2020-12-21 17:02:36 -05:00
Virgil Dupras
efa2556c82 tools/blkup: add shortcut for zero blocks 2020-12-17 20:19:12 -05:00
Virgil Dupras
40b41d296c tools/upload: send data as string hex to avoid control characters
So far, I've been using this tool on remotes that had no control
character handling, but it doesn't work on a TRS-80 4P remote.

Much slower, but at least it works.

Later, I'll try to put some order in this so that we use the fast
lane when possible.
2020-12-16 16:52:54 -05:00
Virgil Dupras
f0087cd48e Revert "tools: make upload a bit faster"
This optimisation appears to make the upload process unreliable in
some cases. I can't appear to reliably upload to my TRS-80 with this
version. I prefer reliability than speed...
2020-12-16 12:44:29 -05:00
Virgil Dupras
2571d20c4c tools: make upload a bit faster 2020-12-12 10:06:55 -05:00
Virgil Dupras
45eceaaf61 Remove indirect memory access
I got bitten again, I've over-designed my solution. The last time
it happened, it was that memory mapping thing I was wanting to add.

The indirect memory access feature I was adding was to solve a
specific problem: Allow Collapse OS to cross-compile directly on a
AT28 EEPROM.

It began well. As long as we were staying in the assembler realm,
things were looking good. However, when we got into the xcomp realm
(B260), things became ugly, and I had to creep up indirection where
I didn't want to.

All of this because I wanted to solve my initial problem in a
slightly more generalized way. The broad idea was that these indirect
memory access could allow xcomp into a broad kind of memory-like
devices.

This idea broke on the "@" part of the equation. If I want
indirections to be two-way and allow xcomp to work properly, I have
to add this indirection to FIND (and possibly others) and this just
isn't practical or elegant.

So, I'm taking a step back and accepting that the solution I design
for now is exclusively for the AT28. What I'm thinking is to add a
low-level hook for memory writing, at the assembly level.
2020-12-07 22:34:53 -05:00
Virgil Dupras
e5a983ab7f Rename A!, A@ and A, to C!*, C@* and C,*
Also, rename "Addressed devices" to "Indirect memory access".

I do this because I need to add indirect versions of !, @ and ,
to allow boostrapping directly to EEPROM and that A,, thing I've
added to assemblers felt like really bad names.

With this change, I'd like to generalize the use of the * suffix
for aliases.
2020-12-07 19:06:58 -05:00
Virgil Dupras
038ca61ea5 Fix broken tools makefile 2020-11-28 11:31:27 -05:00
Virgil Dupras
b4f3fde062 sms: generate TMR SEGA signature in Collapse OS itself
Having the signature generation code in /tools prevents self-hosting
on the SMS.
2020-11-25 21:42:07 -05:00
Virgil Dupras
631e7f1008 tools/exec: fix segfault 2020-11-17 17:02:10 -05:00
Virgil Dupras
95ab1ad588 Transform "blk/" folders into "blk.fs" text files
Working in "blk/" folder from a modern system is harder than it
should be. Moving blocks around is a bit awkward, grepping is a
bit less convenient than it could be, git blame has troubles
following, etc.

In this commit, we modify blkpack and blkunpack to work with single
text files with blocks being separated by a special markup.

I think this will make the code significantly more convenient to
work into.
2020-11-14 18:34:15 -05:00
Virgil Dupras
0d172cc2c4 tools: add smsrom
Running a ROM on an everdrive is one thing, but running a ROM
directly is another: my hacked up sega.bin didn't have a proper
checksum, so the ROM didn't run.

This new tool transforms a binary into a properly-headered ROM.

Has been tested on an actual SMS.
2020-10-10 13:30:43 -04:00
Virgil Dupras
c9ce0f8cfd tools/blkpack: support multiple dirname arguments 2020-09-20 09:38:28 -04:00
Virgil Dupras
7dc00179f7 tools/upload: use A! instead of C! to write
By default, it changes nothing, but it allows interesting
setups, such as using AT28! for directly uploading to EEPROM.

I've also updated the EEPROM recipe to upload directly to 0x2000.
I'm not sure what has changed, but it's working fine now.
2020-09-17 13:30:29 -04:00
Virgil Dupras
a19c814b0d tools: improve reliability of ttyopen()
Previously, communications with my RC2014 would always be rocky and
fail most of the time. By sending an CR at init, things go much
smoother.
2020-09-17 10:25:08 -04:00
Virgil Dupras
fc7971d64f tools: improve stty-related advices in README 2020-08-02 16:21:31 -04:00
Virgil Dupras
4632b3c157 tools/exec: exec specified file instead of hardcoding on stdin
Under OpenBSD, stdin is already used by the device itself because of
the whole "stty has no memory" situation.
2020-08-02 16:11:19 -04:00
Virgil Dupras
b8e52707e9 recipes/arduinouno/at28: improve reliability
Previously, it could never write more than a few bytes before pingpong
getting a mismatch error. Now, I can pingpong Collapse OS binary
without a mismatch.
2020-07-28 15:23:10 -04:00
Virgil Dupras
3607eefa55 Add arduinouno/at28 recipe 2020-07-22 17:26:06 -04:00
Virgil Dupras
c2b507eaff tools: improve usability on OpenBSD
So far, I hadn't managed to run those tools properly on OpenBSD. I
was too confused by its stty peculiarities. I'm still confused, but
at least I managed to make them work... most of the time...
2020-07-02 11:36:53 -04:00
Virgil Dupras
a8302920cb tools/memdump: expect proper prompt 2020-06-30 11:06:59 -04:00
Virgil Dupras
2d9a07d215 blkunpack: don't include trailing empty lines
This was becoming heavy to manage.
2020-06-23 06:52:34 -04:00
link2xt
4017fd04ac
Replace deprecated bzero with memset (#119) 2020-06-16 18:58:23 -05:00
link2xt
79da1db90e
tools: mark local C functions as static (#120) 2020-06-16 18:58:00 -05:00
Virgil Dupras
f6ded7712e VE: add 't'
This is the first commit I do entirely in VE. It's a habit I'm planning
on taking as it helps a lot to find usability issues.
2020-06-11 18:12:01 -04:00
Zac Stewart
ae954906d8
Make blkpack close files when it's done reading them (#108)
* Report when a file cannot be opened

* Close files when done reading them
2020-06-08 19:09:45 -05:00
Virgil Dupras
bcddfd461d blkpack: Remove usage of nonstandard d_type
The man page says it's not always available and it caused problems
under some FSes. The condition is not needed in the context of
blk/, let's scrap it.
2020-06-08 06:38:33 -04:00
Virgil Dupras
c07a594e1a Begin working on a Visual Editor 2020-06-04 10:39:59 -04:00
Virgil Dupras
93c6d150e2 emul: don't embed forth.bin in emul binaries
Read the contents of forth.bin at runtime. This allows us to get
rid of the bin2c tooling.
2020-05-23 09:54:26 -04:00
Virgil Dupras
d777a74be3 Forth takeover! 2020-05-21 22:16:01 -04:00
Virgil Dupras
223cb94466 tools/upload: use C! instead of A!
Addressed devices are not included in Collapse OS by default. Let's
just accept that upload only works with memory.
2020-05-21 07:59:04 -04:00
Virgil Dupras
5504c796ee tools: add blkup
With this tool, we can send content to a TRS-80 directly to floppy.
This paves the way to writing ourselves a set of disks containing the
blkfs!
2020-05-03 08:53:17 -04:00
Virgil Dupras
7344186c62 tools: add blkup
not actually tested yet...
2020-05-03 07:32:19 -04:00
Virgil Dupras
efed0e249e recipes/rc2014/selfhost: add verification instructions 2020-04-27 09:24:40 -04:00
Virgil Dupras
dee7eea497 Move link.fs to blkfs 2020-04-26 14:37:54 -04:00
Virgil Dupras
a2f164ecc3 emul: bootstrap to stage2 from within Collapse OS!
Big bootstrapping change which greatly reduces the role of the modern
operating system in the bootstrapping process.
2020-04-26 10:24:09 -04:00
Virgil Dupras
13771d8c92 xcomp: add XPACK 2020-04-25 16:02:47 -04:00
Virgil Dupras
9edab10a3a blk: add dirty flag and auto write blocks on fetch
Also, fix some PSP leaks related to LOAD.
2020-04-16 20:59:20 -04:00
Virgil Dupras
79ce88c12c tools: add blkunpack
and remove cfspack, which will not ever be used again.
2020-04-16 19:44:17 -04:00
Virgil Dupras
d4cdb659b4 tools: add blkpack 2020-04-13 22:05:03 -04:00
Virgil Dupras
b536d3bfd6 rc2014: complete the EEPROM recipe 2020-04-13 14:41:02 -04:00
Virgil Dupras
d0545d555f upload: use A! instead of C!
It makes the tool much more versatile. I'll have adev being included
in all recipes, so it can be assumed.
2020-04-13 12:00:56 -04:00
Virgil Dupras
509972b08c tools: add exec and convert ./upload to Forth 2020-04-13 10:25:27 -04:00
Virgil Dupras
d6c9ab3f32 tools/stripfc: strip a little bit more 2020-04-12 12:47:50 -04:00
Virgil Dupras
d4324292fb Merge remote-tracking branch 'origin/master' into forth 2020-04-07 19:32:30 -04:00
Virgil Dupras
e37f4c2551 bin2c: add missing stdtypes.h 2020-04-07 18:13:42 -04:00
Byron A. Grobe
217df20d77
Moved tools/bin2c to single-level with other tools. 2020-04-07 16:56:55 -05:00
Byron A. Grobe
f65c189e9b
Replace bin2c.sh with a more portable implementation.
`xxd' is not available on all systems, and on others does not support
the `-i' flag. Since bin2c.sh relied on a tool that I can't seem to find
a compatible version of, I have included a simple, portable replacement in C.

Usage remains the same:
bin2c ARRAYNAME < inputfile > outputfile.

This change is also reflected in emul/Makefile.
2020-04-05 13:04:05 -05:00