{"id":17685169,"url":"https://github.com/andwn/ym2017","last_synced_at":"2025-05-12T21:54:31.451Z","repository":{"id":50726747,"uuid":"103338209","full_name":"andwn/ym2017","owner":"andwn","description":"A music album for the Sega Mega Drive","archived":false,"fork":false,"pushed_at":"2021-05-03T13:55:51.000Z","size":946,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-20T18:39:35.916Z","etag":null,"topics":["chiptune","homebrew","megadrive"],"latest_commit_sha":null,"homepage":"https://catskullelectronics.com/YM2017","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andwn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-13T01:27:37.000Z","updated_at":"2023-12-07T07:54:52.000Z","dependencies_parsed_at":"2022-09-02T22:00:19.520Z","dependency_job_id":null,"html_url":"https://github.com/andwn/ym2017","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andwn%2Fym2017","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andwn%2Fym2017/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andwn%2Fym2017/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andwn%2Fym2017/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andwn","download_url":"https://codeload.github.com/andwn/ym2017/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253830861,"owners_count":21971000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chiptune","homebrew","megadrive"],"created_at":"2024-10-24T10:26:45.681Z","updated_at":"2025-05-12T21:54:31.431Z","avatar_url":"https://github.com/andwn.png","language":"C","readme":"# YM2017\n\nThe software which runs on the YM2017 music cart for MegaDrive.\n\nMore info: https://catskull.net/ym2017\n\n### Building\n\nCurrently only GNU/Linux systems are supported for building. \nFeel free to contribute a Windows build/Makefile, but I don't have the means right now.\n\n1. Set up [marsdev](https://github.com/andwn/marsdev)\n2. Just clone \u0026 make!\n\nAlternatively, you can build on other platforms (e.g. OS X) using Docker:\n\n1. Install [Docker](https://www.docker.com/)\n1. Run:\n \n        $ ./build-rom.sh\n                \n1. The built ROM is named `ym2017-${GIT_REVISION}.bin`\n\nIf you have a YM2017 cart, it is reflashable with Krikzz flasher. So if you want\nto play with the LEDs by making your own ROMs you are free to do so.\n\nEven if you don't, it'll work on a flash cart or emulator. Anyone can see how it works\nor reuse parts for their own purposes.\n\n\n### How to add a new track\n\nFirst you need a VGM. Toss it into `res/bgm`. Inside of that folder is `resources.res`. \nAdd a line like this:\n\n    XGM BGM_MyNewTrack\t\"bgm/MyNewTrack.vgm\" 0\n\nThat'll get the song into the ROM, but it also needs to be added to the playlist.\nOpen up `src/songtab.c` and add a new entry to the table:\n\n    {\n\t\t.xgm_data \t= BGM_MyNewTrack,\n\t\t.xgm_length = TIME(6, 0, 0),\n\t\t.title \t\t= \"My New Track\",\n\t\t.artist \t= \"Me\",\n\t},\n\nThe SONG_COUNT in `inc/songtab.h` also needs to be increased.\n\nNow your track is selectable and you can actually listen to it, but the visualization is\nmissing. This is the hard part, and it is rather hacky. Look in `tools/tabgen` and you will\nsee tabgen.c. This was written to generate a table based on a VGM file. First built it,\nthen feed it your VGM file.\n\n    gcc tabgen.c -o tabgen\n    ./tabgen ../../res/bgm/MyNewTrack.vgm 0123456667\n\nYou're probably wondering what the heck those numbers are for. Basically, some tracks don't\nuse all the sound channels. Also, the MegaDrive has 10 sound channels, while the LED array\nonly has 8 columns. To workaround both of these a string of 10 digits must be given. Each\ndigit represents one of the channels on both chips, first 6 are the YM2612 and last 4 are\nthe SN76489. The values of the digits, between 0 and 7, represent which column of the array\nthe channel is assigned to. So for this example, only the 2 rightmost columns are for the\nSN76489 PSG channels, combining the 3 square channels and leaving the noise channel on its\nown.\n\nA new file names vistab.c should be created. At the bottom is a #define line. Cut \u0026 paste \nthis into `inc/vistab.h`, as well as declare the array.\n\n    #define MyNewTrack_Size 4321\n    extern const vistab MyNewTrack[];\n\nNext, copy the whole table (ctrl+a selects everything in the file) to the end of `src/vistab.c`.\n\nNow that the data is there, point to it in `src/songtab.c`.\n\n    {\n\t\t.xgm_data \t= BGM_MyNewTrack,\n\t\t.xgm_length = TIME(6, 0, 0),\n\t\t.vis_data\t= MyNewTrack,\n\t\t.vis_length = MyNewTrack_Size,\n\t\t.title \t\t= \"My New Track\",\n\t\t.artist \t= \"Me\",\n\t},\n\nDon't forget to update the time with the real track length! Also, if you have a VGM that loops,\nthe visualization will suddenly stop after hitting the loop point. There is a workaround for\nthis though. Notice how a couple tracks have 2 extra values set.\n\n    .loopstart  = TIME(0, 4, 0),\n\t.loopend    = TIME(1,38, 0),\n\nJust figure out at what time the loop points are in the track and add the values, and the\nvisualization should loop along when the track does.\n\n\n### How to generate the marquees\n\nYou don't. I drew text into arrays of 1's and 0's manually.\n\n\n### Credits / Thanks\n\nThe YM2017 team!\n\n    Hardware          Jazz\n    Software          Grind\n    Logo              Keff\n    Backgrounds       Ui\n    Producer          Catskull\n\nThe artists!\n\n    Luke McQueen\n    nooly\n    Jredd\n    Cosmo Buggi\n    Savaged Regime\n    Tobikomi\n    Uctumi\n    Dya\n    Laz\n\nParts of Stef's SGDK are used including the XGM sound driver, LZ4W compression, and the font.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandwn%2Fym2017","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandwn%2Fym2017","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandwn%2Fym2017/lists"}