![]() |
![]() |
#161 |
Registered User
![]() Join Date: Jan 2018
Location: Dublin
Posts: 7
|
First of all, thanks for sharing your player.
I am trying to use it as-is in my C program and I run into this error during compilation. Code:
vasmm68k_mot -m68000 -noesc -Fhunk /data/ptplayer.asm -o asm.o vasm 1.8 (c) in 2002-2017 Volker Barthelmann vasm M68k/CPU32/ColdFire cpu backend 2.2 (c) 2002-2017 Frank Wille vasm motorola syntax module 3.10 (c) 2002-2017 Frank Wille vasm hunk format output module 2.9a (c) 2002-2017 Frank Wille CODE(acrx2): 13096 bytes vc +kick13 -c99 -cpu=68000 -I/root/amiga_sdk/NDK_3.9/Include/include_h -lamiga -lauto -g -c /data/animtools.c vc +kick13 -c99 -cpu=68000 -I/root/amiga_sdk/NDK_3.9/Include/include_h -lamiga -lauto -g -c /data/main.c vc +kick13 -c99 -cpu=68000 -I/root/amiga_sdk/NDK_3.9/Include/include_h -lamiga -lauto -g -c /data/msx.c error 9 in line 13 of "/tmp/fileJt6Y2C.asm": instruction not supported on selected architecture > movec vbr,d0 vasmm68k_mot -quiet -Fhunk -phxass -nowarn=62 "/tmp/fileJt6Y2C.asm" -o "/data/msx.o" failed |
![]() |
![]() |
#162 |
Natteravn
![]() Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,152
|
Not sure what you did there. In the first line you showed that assembling ptplayer.asm definitely works. Then later you compile a C source and it fails? There is also no MOVEC in ptplayer.asm.
As I understand it, you inserted a MOVEC assembler-inline into msx.c to read the VBR, but you insist in compiling for cpu=68000? Then the error is correct, because MOVEC is an 68010 instruction. |
![]() |
![]() |
#163 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 50
Posts: 6,319
|
looks like generated startup file isn't compatible with 68000... nothing to do with ptplayer I confirm. You need to provide VBR to the player but player doesn't read it itself (would require supervisor calls).
Compile your c source with 68010 mode, and call MOVEC only if current CPU is 68010 else return 0. I don't think you risk introducing incompatibilities with 68000 with 68010 mode, unlike 68020 mode which could "optimize" with odd-address word read. |
![]() |
![]() |
#164 |
Moderator
![]() Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,174
|
To be compatible with 68010 and up, the code must do a run-time check for CPU model and decide whether to use MOVEC or not.
A common problem is that in order to compile this for 68000, the MOVEC instruction must not be in the code. movec VBR,d0 is equivalent to dc.l $4e7a0801. The compiler or assembler must then (in the part of the code that should execute a MOVEC) support in-line data. If it doesn't, you can put the word sequence 0x4e7a, 0x0801, 0x4e73 in a data area, get the starting address, and Supervisor() to it. ($4e73 is equivalent to RTE) |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
MOD-player with external sound effects | phx | Coders. Asm / Hardware | 14 | 18 June 2012 10:41 |
Amiga Forever&Protracker bad sound | moriez | support.WinUAE | 14 | 06 January 2009 01:26 |
What was the first Amiga tracker to support external midi instruments | Kola | Amiga scene | 3 | 09 December 2008 19:20 |
Sound/Protracker package | Dunny | request.Apps | 3 | 23 July 2008 19:17 |
Sampled sound player? | cdoty | Coders. General | 7 | 25 August 2007 16:21 |
|
|