English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 01 September 2022, 08:57   #21
Csoft
Registered User
 
Join Date: Apr 2021
Location: Italy
Posts: 21
Quote:
Originally Posted by a/b View Post
audioChannel is 0-3 and audioDmaBits is { 1, 2, 4, 8 }?
Yes, exactly.
Csoft is offline  
Old 01 September 2022, 09:17   #22
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,986
Quote:
Originally Posted by Galahad/FLT View Post
When the floppy spin sound restarts, does the floppy light onscreen turn on with the sound or does it stay off?
?????
Galahad/FLT is offline  
Old 01 September 2022, 09:52   #23
Csoft
Registered User
 
Join Date: Apr 2021
Location: Italy
Posts: 21
Quote:
Originally Posted by Galahad/FLT View Post
?????
Must check this evening from WinUAE when I'll be at home, showing floppy LEDs on FS-Uae requires a configuration procedure that is quite mad.
Csoft is offline  
Old 01 September 2022, 23:34   #24
Csoft
Registered User
 
Join Date: Apr 2021
Location: Italy
Posts: 21
Quote:
Originally Posted by Galahad/FLT View Post
When the floppy spin sound restarts, does the floppy light onscreen turn on with the sound or does it stay off?
According to WinUAE emulation, the floppy light remains always on even when the spin sound stops. Turns back off only when I quit my game and go back to CLI.
Csoft is offline  
Old 02 September 2022, 15:54   #25
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Csoft View Post
No, I'm not shutting down the system at all. I'm trying to keep everything OS friendly.
Since I noticed you are using my "ptplayer" you should know that this is not a recommended use case. From the
ptplayer.readme
:
Code:
  This player is intended for games/demos which take over the hardware
  and disable the OS.
When calling
mt_install_cia()
it will replace the level-6 interrupt vector at
VBR+$78
. This also replaces any previous AmigaOS interrupt handler for level-6 interrupts. I guess this is the source for your problems with timer.device and trackdisk.device under AmigaOS.

Solution: Take over the whole machine or use an OS-friendly PT-player.
phx is offline  
Old 02 September 2022, 21:08   #26
Csoft
Registered User
 
Join Date: Apr 2021
Location: Italy
Posts: 21
Quote:
Originally Posted by phx View Post
Since I noticed you are using my "ptplayer" you should know that this is not a recommended use case. From the
ptplayer.readme
:
Code:
  This player is intended for games/demos which take over the hardware
  and disable the OS.
When calling
mt_install_cia()
it will replace the level-6 interrupt vector at
VBR+$78
. This also replaces any previous AmigaOS interrupt handler for level-6 interrupts. I guess this is the source for your problems with timer.device and trackdisk.device under AmigaOS.

Solution: Take over the whole machine or use an OS-friendly PT-player.
Thank you for your kind support, but I think this is not the case. The problem is exactly the same even if I don't use ptplayer at all. (See my previous post)

Honestly this is the first time I try a "OS friendly" approach in C and the first time I read assets in memory from disk, I come from "old school" ways of coding, I've always coded in assembly with asmone and every asset included with incbins...

Even if, in this game, my goal is to load everything I need from files and then call Forbid() to get maximum performance.
Csoft is offline  
Old 02 September 2022, 22:34   #27
Csoft
Registered User
 
Join Date: Apr 2021
Location: Italy
Posts: 21
Found!!!

THIS was the problem:

Code:
SetTaskPri(FindTask(NULL), TASK_PRIORITY);
At the start of the program I was setting the task priority to 127 in order to have full priority, removing this everything works ok, I absolutely have no idea why...
In any case, probably this instruction is a nonsense since I call Forbid() after finishing with disk read...

So, the correct flow is:
  • Read everything from files
  • Wait some seconds
  • Call Forbid()

The LED related hint by Galahad/FLT was VITAL, thank you my friend, you will be acknowledged in my very alpha-stage and work in progress C Amiga Engine.

https://coppersoft.itch.io/planar

Thank you all guys, Amiga community still rocks!!!

Lorenzo
Csoft is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
(A1200) Chinon FZ-354 Floppy Drive is spinning randomly Sim085 support.Hardware 3 07 January 2022 08:54
CD Spinning Problems spawnerbr support.Hardware 0 21 August 2020 06:46
Standard C libraries? aka fopen,fread,fwrite FirstNE Coders. C/C++ 8 07 August 2020 22:05
Problem with fread while booting game from adf MacSpain Coders. General 5 16 May 2020 11:34
Amiga 500 Panasonic floppy drive only spinning sometimes. h4tt3n support.Hardware 5 24 January 2016 16:20

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:48.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.22185 seconds with 13 queries