ngdevkit:macosm1

Last commit made on 2023-09-11
Get this branch:
git clone -b macosm1 https://git.launchpad.net/ngdevkit

Branch merges

Branch information

Name:
macosm1
Repository:
lp:ngdevkit

Recent commits

ddce2f5... by Damien Ciabrini

Update doc sections and CI script for M1 SoC

39214f1... by Damien Ciabrini

Fix .data2 LMA section overlapping with linkscript

The current linkscript doesn't specify LMA for sections as
they are not considered when an ELF is processed by objcopy.
However this might confuse ld when the objects are compiled
by a more recent compiler than gcc 5.5.

Fix LMA assignment by making .data, .data2 and .text consecutive.

Ref dciabrin/homebrew-ngdevkit#4

859fc94... by Damien Ciabrini

nullsound: z80 fixes for mame / real hardware

* Init didn't configure z80 ports appropriately [1] so NMI were not
received by the sound driver, and no sound was emitted on Mame.
This is likely the same issue on real hardware.

* Sound commands 01/03 didn't mute the ADPCMa channel correcly, this
one is fixed. More improvement will follow in another commit to mute
all channels (SSG, ADPCMa/b, FM).

* The write to YM2610 was unecessarily waiting for YM2610 status.
This is now changed in favour of busy waiting on Z80 to allow the
YM2610 to settle between writes. This follows the information from
neogeodev wiki [1], but could not be tested on real hardware. This is
working on Mame and GnGeo.

[1] https://wiki.neogeodev.org/index.php?title=Z80_port_map
[2] https://wiki.neogeodev.org/index.php?title=Z80/YM2610_interface

Closes #64

c69ad54... by Damien Ciabrini

Update main README and its badges

2506b68... by Damien Ciabrini

msys2: Update build and docs to target ucrt64

Nightly CI deprecated mingw64 packages in favour of ucrt64
package. Update the source build steps and documentation to
drop mingw support and only provide msys2/ucrt64 support.

Ref #94

dd66c56... by Damien Ciabrini

msys2: move CI build to ucrt64 subsystem

Ref dciabrin/ngdevkit#92

fd2f5fa... by Kaito Sinclaire <email address hidden>

Be more neat & tidy with the .data section

f03250f... by Kaito Sinclaire <email address hidden>

Optimize C runtime initialization

Instead of clearing or overwriting memory one byte at a time, take
advantage of the fact that #__bss_start_in_ram and #__data_start_in_ram
are already guaranteed to be long-aligned, reserve d1-d7 and a0, and
movem from them directly into the correct locations.
This speeds up the initialization sequence for larger programs by
a couple orders of magnitude.

Because this code works in blocks of 32 bytes only, some chaff is left
over at the end of user memory (from 1 to 32 bytes worth). I don't
consider this an issue, because:
- That area is the heap, used for dynamic allocation, and using it
  without clearing it out yourself is _already_ undefined behavior, and
- The previous code also left a byte of chaff in the same location
  due to an off-by-one mistake.

The BSS segment is also initialized before the data segment, to avoid
a bug that the original code could occasionally encounter: Because it
was off by one in its calculations, clearing out the BSS segment could
result in clobbering the first byte of the data segment, if there was
no padding between the end of the BSS segment and the start of the data
segment (aka: if the length of the BSS segment was a multiple of 4).

In addition, the watchdog is only kicked once at the end of each loop,
because they now are fast enough that the watchdog resetting the system
is no longer a concern in even the worst cases, and it confers yet
another speedup.

d407786... by Damien Ciabrini

Fix linking when backup RAM is used

Follow-up fix of linkscript after [1]. The linkscript
incorrectly relies on lazy evaluation to computes the
start of the .bss segment in RAM, leaving all linked
symbols incorrectly shifted in memory.

Re-work the backup RAM definition in the linkscript
with a proper MEMORY command, and expose macros in
the ngdevkit API to override the start and length of
the backup RAM at link-time.

Closes #86

[1] 4ccd470cd0039fbaf18e7f915f45d0d36d5e09d5

3192779... by Damien Ciabrini

CI: update call to nightly build script for brew