Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update for the latest GBDK-2020 v4.2 and above #12

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update for the GBDK-2020 v4.x; separate driver from the tracker; gene…
…rate song file to the separate folder
  • Loading branch information
untoxa committed Apr 12, 2024
commit 1caa6ad55e5b97c1e4b19adc7f097494898f982d
31 changes: 2 additions & 29 deletions compile.bat
Original file line number Diff line number Diff line change
@@ -1,29 +1,2 @@
@echo off
java.exe -jar parser\MMLGB.jar music\%1 driver\song.asm
if %errorlevel% neq 0 (
pause
exit /b %errorlevel%
)

lcc.exe driver\player.asm driver\music.asm driver\song.asm driver\freq.asm driver\noisefreq.asm driver\vib.asm -o rom.gb

if %errorlevel% neq 0 (
echo Error compiling rom!
pause
exit /b %errorlevel%
)

@echo off
setlocal EnableDelayedExpansion
set "cmd=findstr /R /N "^^" driver\song.asm | find /C ":""

for /f %%a in ('!cmd!') do set INSERT_SIZE=%%a
setlocal DisableDelayedExpansion
set /a "INSERT_SIZE=%INSERT_SIZE%-2"

echo %~nx0 compiled to rom.gb successfully!
echo:
echo Insert size: %INSERT_SIZE% bytes
echo Launching rom...
rom.gb
pause
@java.exe -jar parser\MMLGB.jar %1 driver\song\song.asm
%GBDK_HOME%\bin\lcc -Wl-j -Wm-yS -o rom.gb -Idriver driver/*.c driver/song/*.asm driver/player/*.c
4 changes: 2 additions & 2 deletions compile.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#/bin/sh

java -jar parser/MMLGB.jar "$1" driver/song.asm
java -jar parser/MMLGB.jar "$1" driver/song/song.asm

lcc -Wl-j driver/player.asm driver/music.asm driver/song.asm driver/freq.asm driver/noisefreq.asm driver/vib.asm -o rom.gb
$(GBDK_HOME)/bin/lcc -o rom.gb -Idriver driver/*.c driver/song/*.asm driver/player/*.c
32 changes: 0 additions & 32 deletions dist.bat

This file was deleted.

9 changes: 0 additions & 9 deletions driver/Makefile

This file was deleted.

127 changes: 10 additions & 117 deletions driver/freq.c
Original file line number Diff line number Diff line change
@@ -1,120 +1,13 @@
#include "freq.h"

const unsigned int freq[] = {
0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL, 0UL, 0UL, 0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL,
0UL, 0UL, 0UL, 0UL,
44UL,
157UL,
263UL,
363UL,
458UL,
547UL,
631UL,
711UL,
786UL,
856UL,
923UL,
986UL,
0UL, 0UL, 0UL, 0UL,
1046UL,
1102UL,
1155UL,
1205UL,
1253UL,
1297UL,
1340UL,
1379UL,
1417UL,
1452UL,
1486UL,
1517UL,
0UL, 0UL, 0UL, 0UL,
1547UL,
1575UL,
1602UL,
1627UL,
1650UL,
1673UL,
1694UL,
1714UL,
1732UL,
1750UL,
1767UL,
1783UL,
0UL, 0UL, 0UL, 0UL,
1798UL,
1812UL,
1825UL,
1837UL,
1849UL,
1860UL,
1871UL,
1881UL,
1890UL,
1899UL,
1907UL,
1915UL,
0UL, 0UL, 0UL, 0UL,
1923UL,
1930UL,
1936UL,
1943UL,
1949UL,
1954UL,
1959UL,
1964UL,
1969UL,
1974UL,
1978UL,
1982UL,
0UL, 0UL, 0UL, 0UL,
1985UL,
1989UL,
1992UL,
1995UL,
1998UL,
2001UL,
2004UL,
2006UL,
2009UL,
2011UL,
2013UL,
2015UL,
0UL, 0UL, 0UL, 0UL,
2017UL,
2018UL,
2020UL,
2022UL,
2023UL,
2025UL,
2026UL,
2027UL,
2028UL,
2029UL,
2030UL,
2031UL
const UWORD freq[] = {
0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U,
0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U,
44U, 157U, 263U, 363U, 458U, 547U, 631U, 711U, 786U, 856U, 923U, 986U, 0U, 0U, 0U, 0U,
1046U,1102U,1155U,1205U,1253U,1297U,1340U,1379U,1417U,1452U,1486U,1517U, 0U, 0U, 0U, 0U,
1547U,1575U,1602U,1627U,1650U,1673U,1694U,1714U,1732U,1750U,1767U,1783U, 0U, 0U, 0U, 0U,
1798U,1812U,1825U,1837U,1849U,1860U,1871U,1881U,1890U,1899U,1907U,1915U, 0U, 0U, 0U, 0U,
1923U,1930U,1936U,1943U,1949U,1954U,1959U,1964U,1969U,1974U,1978U,1982U, 0U, 0U, 0U, 0U,
1985U,1989U,1992U,1995U,1998U,2001U,2004U,2006U,2009U,2011U,2013U,2015U, 0U, 0U, 0U, 0U,
2017U,2018U,2020U,2022U,2023U,2025U,2026U,2027U,2028U,2029U,2030U,2031U
};
4 changes: 3 additions & 1 deletion driver/freq.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef MUS_FREQ_H
#define MUS_FREQ_H

extern const unsigned int freq[];
#include <gbdk/platform.h>

extern const UWORD freq[];

#endif
Loading