Skip to content

Commit 0938495

Browse files
committed
- 6.0.0.0 Supported PAULA_8364(AMIGA).
1 parent c84002d commit 0938495

File tree

11 files changed

+44
-26
lines changed

11 files changed

+44
-26
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MAmidiMEmo 5.9.1.0 Itoken (c)2019, 2025 / GPL-2.0
1+
MAmidiMEmo 6.0.0.0 Itoken (c)2019, 2025 / GPL-2.0
22

33
*** What is the MAmidiMEmo? ***
44

@@ -274,6 +274,7 @@ e.g.) YM2151 has 8ch FM sounds, so you can play 8 chords on MIDI 1ch or sharing
274274
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SNQ9JE3JAQMNQ)
275275

276276
*** Changes
277+
- 6.0.0.0 Supported PAULA_8364(AMIGA).
277278
- 5.9.1.0 Supported 2nd PSG for MSX for VGMPlyer.
278279
- 5.9.0.0 Supported NanoDrive 6 UART for OPN2, DCSG.
279280
- 5.8.2.0 Added Push/Pop Tone button on the FM Timbre Editor.

docs/MAmidiMEmo/Manual.pdf

73 KB
Binary file not shown.

docs/MAmidiMEmo/Manual.pptx

3.19 KB
Binary file not shown.

src/VSIF/VSIF_AMIGA/main.c

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,14 @@ APTR GetAudioInterruptHandler() {
116116
static __attribute__((interrupt)) void audioInterruptHandler();
117117

118118
void TakeSystem() {
119-
#ifndef NO_INT
119+
SystemDMA=custom->dmaconr;
120+
120121
Forbid();
122+
123+
#ifndef NO_INT
121124
//Save current interrupts and DMA settings so we can restore them upon exit.
122125
SystemADKCON=custom->adkconr;
123126
SystemInts=custom->intenar;
124-
SystemDMA=custom->dmaconr;
125127

126128
//https://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_3._guide/node0203.html
127129
// Disable -- disable interrupt processing.
@@ -186,9 +188,10 @@ void FreeSystem() {
186188

187189
//Restore all interrupts and DMA settings.
188190
custom->intena=SystemInts|0x8000;
189-
custom->dmacon=SystemDMA|0x8000;
190191
custom->adkcon=SystemADKCON|0x8000;
191192
#endif
193+
custom->dmacon=SystemDMA|0x8000;
194+
192195
for(int i=0; i<256; i++)
193196
{
194197
if(pcmDataTable[i].dataPtr != NULL)
@@ -215,8 +218,9 @@ void FreeSystem() {
215218

216219
#ifndef NO_INT
217220
Enable();
218-
Permit();
219221
#endif
222+
Permit();
223+
220224
Exit(0);
221225
}
222226

@@ -500,14 +504,14 @@ void showMessage(char *message)
500504
// }
501505
}
502506

503-
void printText(char* message)
507+
void printText(char* message, int ofst_x, int ofst_y)
504508
{
505509
if(mainWin)
506510
{
507511
int clientWidth = mainWin->Width - mainWin->BorderLeft - mainWin->BorderRight;
508512
int clientHeight = mainWin->Height - mainWin->BorderTop - mainWin->BorderBottom;
509-
int text_x = mainWin->BorderLeft;
510-
int text_y = mainWin->BorderTop;
513+
int text_x = mainWin->BorderLeft + ofst_x;
514+
int text_y = mainWin->BorderTop + ofst_y;
511515
struct IntuiText label = {
512516
1, 0, JAM2, text_x, text_y, NULL, (UBYTE *)message, NULL
513517
};
@@ -536,26 +540,21 @@ void InitHook(struct Hook *hook, ULONG (*c_function)(), APTR userdata)
536540
hook->h_Data = userdata;
537541
}
538542

539-
/*
540-
*/
541-
void main(struct WBStartup *wb)
543+
int WBmain(struct WBStartup *wb)
542544
{
543545
SysBase = *((struct ExecBase**)4UL);
544546
custom = (struct Custom*)0xdff000;
545547

546-
TakeSystem();
547-
548548
// used for printing
549549
DOSBase = (struct DosLibrary*)OpenLibrary((CONST_STRPTR)"dos.library", 0);
550550
if (!DOSBase)
551551
FreeSystem();
552-
553-
#ifdef NOGUI
554-
wb = NULL;
555-
#endif
552+
553+
TakeSystem();
554+
556555
if (wb) {
557556
// Intuition ライブラリを開く
558-
IntuitionBase = (struct IntuitionBase *)OpenLibrary((CONST_STRPTR)"intuition.library", 37);
557+
IntuitionBase = (struct IntuitionBase *)OpenLibrary((CONST_STRPTR)"intuition.library", 0);
559558
if (!IntuitionBase) {
560559
showMessage("Failed to load GUI!");
561560
FreeSystem();
@@ -701,7 +700,7 @@ VWritef("Completed serial setting.\n", NULL);
701700

702701
for(int i=0;i<12 * (100);i++)
703702
SineData[12 + i] = SineData[i];
704-
703+
/*
705704
SineData[12 * 100 - 12] = -125;
706705
SineData[12 * 100 - 11] = -100;
707706
SineData[12 * 100 - 10] = -75;
@@ -715,10 +714,10 @@ VWritef("Completed serial setting.\n", NULL);
715714
SineData[12 * 100 - 3] = 100;
716715
SineData[12 * 100 - 2] = 125;
717716
SineData[12 * 100 - 1] = 127;
718-
717+
*/
719718
pcmDataTable[0].dataPtr = SineData;
720719
pcmDataTable[0].length = 12 * 100;
721-
pcmDataTable[0].loop = 12*100 - 12;
720+
//pcmDataTable[0].loop = 12*100 - 12;
722721
//pcmDataTable[0].loop = 0;
723722

724723
// PLAY SOUND
@@ -869,10 +868,12 @@ VWritef("Completed serial setting.\n", NULL);
869868
*/
870869

871870
#endif
872-
if(mainWin)
873-
printText("MAmi VSIF driver ready.");
874-
else
875-
printText("Ready.\n**Press Ctrl-C** to exit. If not, System may crash.");
871+
if(mainWin)
872+
{
873+
printText("MAmi VSIF driver ready.", 0, 0);
874+
printText("DO NOT touch mouse/key while sounding!", 0, 16);
875+
}else
876+
printText("Ready.\n**Press Ctrl-C** to exit. If not, System may crash.", 0, 0);
876877
//int val = readCMD();
877878
int error = 0;
878879
//UBYTE *dataBufPtr = (UBYTE *)readArray(6);
@@ -1075,3 +1076,19 @@ VWritef("Completed serial setting.\n", NULL);
10751076
// END
10761077
FreeSystem();
10771078
}
1079+
1080+
/*
1081+
*/
1082+
/* 通常のmain関数:CLIまたはWorkbench起動両方をここから呼ぶ */
1083+
int main(int argc, char **argv) {
1084+
struct WBStartup *wb = (struct WBStartup *)argv;
1085+
if (argc == 0) {
1086+
// GUIから起動された
1087+
} else {
1088+
// CLIから起動された
1089+
}
1090+
#ifdef NOGUI
1091+
wb = NULL;
1092+
#endif
1093+
WBmain(wb);
1094+
}
152 Bytes
Binary file not shown.
5.77 KB
Binary file not shown.
535 Bytes
Loading
1.05 KB
Binary file not shown.
535 Bytes
Loading
885 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)