Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Stephane-D/SGDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane-D committed Jan 2, 2025
2 parents debb814 + 1e1a640 commit 8db29ed
Show file tree
Hide file tree
Showing 9 changed files with 150 additions and 119 deletions.
Binary file modified bin/convsym.exe
Binary file not shown.
Binary file modified lib/libmd.a
Binary file not shown.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Github: https://github.com/Stephane-D/SGDK

**SGDK** is a free development kit allowing development of software in **C language** for the **Sega Mega Drive**.
It contains the development library itself (with the code sources) and some custom tools used to compile resources.
SGDK uses the GCC compiler (m68k-elf target) and the libgcc to generate a ROM image. Binaries (GCC 6.3) are provided for Windows OS for convenience, but you need to install it by yourself for other operating systems.
SGDK uses the GCC compiler (m68k-elf target) and the libgcc to generate a ROM image. Binaries (GCC 13.2) are provided for Windows OS for convenience, but you need to install it by yourself for other operating systems.
Note that SGDK also requires Java (custom tools require it), so you need to have Java installed on your system.

SGDK library and custom tools are distributed under the MIT license (see [license.txt](license.txt) file).
Expand Down
18 changes: 14 additions & 4 deletions src/sys_a.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,32 @@ func SYS_assertReset


func SYS_reset
move #0x2700,%sr
move.l (0),%a7
move #0x2700,%sr
move.l (0),%a7

move %sp, %usp
sub #USER_STACK_LENGTH, %sp // configure a USER_STACK_LENGTH bytes user stack at bottom, and system stack on top of it

move.l #0xA11100,%a0 /* Z80_HALT_PORT */
move.w #0x0100,%d0
move.w %d0,(%a0) /* HALT Z80 */
move.w %d0,0x0100(%a0) /* END RESET Z80 */

jmp _reset_entry


func SYS_hardReset
move #0x2700,%sr
move.l (0),%a7
move #0x2700,%sr
move.l (0),%a7

move %sp, %usp
sub #USER_STACK_LENGTH, %sp // configure a USER_STACK_LENGTH bytes user stack at bottom, and system stack on top of it

move.l #0xA11100,%a0 /* Z80_HALT_PORT */
move.w #0x0100,%d0
move.w %d0,(%a0) /* HALT Z80 */
move.w %d0,0x0100(%a0) /* END RESET Z80 */

jmp _start_entry


Expand Down
23 changes: 15 additions & 8 deletions tools/convsym/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@

# ConvSym version history

### Version 2.12.1 (2024-12-14)

* `deb2` output format:
- Fixed an edge-case bug where if one block is too large and symbol heap exceeds 64 kb, all further blocks are skipped.

* Improve README, including some wording and terminology (e.g. "input/output parsers" -> "input/output formats").

### Version 2.12 (2024-12-11)

* Added support for symbol references instead of raw offsets in `-ref` and `-org` options:
Expand All @@ -14,7 +21,7 @@

* Added new `txt` input parser to parse arbitrary text files; ConvSym can now parse SGDK's `symbols.txt` file.

* `asm` and `log` output parsers:
* `asm` and `log` output formats:
- Implement proper options support in `-outopt`. You can configure line format as `-outopt "/fmt='format-string'"` now (legacy `-outopt "format-string"` syntax is preserved). This goes in line with the new `txt` parser (which also has `/fmt` option among others and will allow to add additional options in the future;
- Warn if line format string is incorrect (e.g. too few arguments specified).

Expand All @@ -24,7 +31,7 @@
* `as_lst_exp` input parser:
- Show a warning that `-inopt` is unsupported if user tries to set it.

* `deb2` and `deb1` output parsers:
* `deb2` and `deb1` output formats:
- Made tree flattening algorithm introduced in 2.10 deterministic.

* Document all default parser options in ConvSym's usage message (printed when invoked without arguments), document `-debug` option.
Expand All @@ -33,12 +40,12 @@

* Added `-addprefix` option to prepend any string to output symbols.

* `deb2` and `deb1` output parsers:
* `deb2` and `deb1` output formats:
- Fixed a rare symbol encoding issue where data with unusual entropy would produce long prefix trees with some codes exceeding 16-bits. Respective characters (usually extremely rare) would then fail to decode properly corrupting a small set of symbol texts. A custom tree rebalancing algorithm was implemented to fix trees with codes longer than 16-bit;
- Fixed a minor memory leak (<2 kb in a lifetime) on nodes in encoding function;
- Fixed a tiny (several bytes) memory leak due to an unreleased file handle.

* `asm` and `log` output parsers:
* `asm` and `log` output formats:
- Properly report I/O error if output file couldn't be opened.

### Version 2.9.1 (2023-03-22)
Expand Down Expand Up @@ -67,15 +74,15 @@

### Version 2.7.1 (2022-07-23)

* Fix incorrect newlines produced by `log` and `asm` output parsers on Windows;
* Fix incorrect newlines produced by `log` and `asm` output formats on Windows;
* Fix a minor memory leak when a parser crashes;
* Overall stability and portability improvements.

### Version 2.7 (2021-04-27)

* Added support for multiple labels sharing the same offset for all input and output wrappers;

* `deb1` and `deb2` output parsers:
* `deb1` and `deb2` output formats:
- Add "/favorLastLabels" option, which toggles choosing last labels when there are multiple labels at the same offset (first labels are preferred otherwise).

### Version 2.6 (2021-02-01)
Expand All @@ -93,10 +100,10 @@
- Fixed a bug that prevented offsets >=$80000000 to be added due to incorrect signed boundary check;
- When several labels occur on the same offset, use the last label met, not the first;
- Track last global label name correctly (it previously didn't update the label when it was filtered via boundary or other checks).
* `deb1` output parser:
* `deb1` output format:
- Fix memory corruption when symbol map requires more than 64 memory blocks;
- Explicitly limit symbols map to 64 blocks, display an error when overflow was about to occur.
* `deb2` output parser:
* `deb2` output format:
- Fix infinite loop when the full the last block id was 0xFFFF;
- Limit symbols map to 256 blocks, display error if more blocks were requested.

Expand Down
Loading

0 comments on commit 8db29ed

Please sign in to comment.