LisaList2

Advanced search  

News:

2022.06.03 added links to LisaList1 and LisaFAQ to the General Category

Pages: [1] 2   Go Down

Author Topic: Newbie: simple Pascal program doesn't work in LisaEm  (Read 5790 times)

kewatsdop

  • Full Member
  • ***
  • Karma: +8/-0
  • Offline Offline
  • Posts: 28
Newbie: simple Pascal program doesn't work in LisaEm
« on: January 28, 2022, 02:19:50 am »

Hi all,

I'm new here so please don't be mad at me if this question has an obvious answer. I search the forum and Google and could not find anything obvious...

I input a very simple Pascal program "beep.text" in LisaEm, using Workshop 3.0:

PROGRAM sound;
USES HWINT;

BEGIN
    Beep(3000, 5000);
END.


Then I compile it with P command to beep.obj, then link it with L command using beep.obj, iospaslib.obj and sys1lib.obj. The object files are linked successfully into an output file bp.obj. Then I run the program with R, and it executes successfully but there's no sound from the beeper.

What am I doing wrong?

Adam

Logged

compu_85

  • Sr. Member
  • ****
  • Karma: +66/-0
  • Offline Offline
  • Posts: 233
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #1 on: January 28, 2022, 07:59:29 am »

If you go into the Preferences window and change the beeper volume does it make a tone?
Logged

kewatsdop

  • Full Member
  • ***
  • Karma: +8/-0
  • Offline Offline
  • Posts: 28
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #2 on: January 28, 2022, 08:13:22 am »

I don't see beeper volume option (see attached), but LisaEm _does_ make beeper sounds e.g. when boot drive is missing or similar.
Logged

rayarachelian

  • Administrator
  • Hero Member
  • *****
  • Karma: +101/-0
  • Offline Offline
  • Posts: 772
  • writing the code,writing the code,writing the code
    • LisaEm
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #3 on: January 28, 2022, 09:03:54 am »

@compu_85 is talking about the Preferences icon in Lisa Office System (LOS). see: http://toastytech.com/guis/lisaos31prefs.png




(You'd normally need to install both Lisa Pascal Workshop (LPW) + Lisa Office on the same ProFile drive and then use the Environments window to switch between them, though it's possible to just install LPW by itself.)
see: https://lisafaq.sunder.net/single.html#lisafaq-sw_os_environments

However, first things first, do you hear sound effects such as clicks when the Lisa turns on/off and the floppy is accessed? So looks like you've replied that you do, so that's good.
Next, I'd say try changing the pitch value to some other value, and extend the delay, and see if that helps.

I'd also see if there's some Setvolume() function you can access from your code and try to set that, I guess to 5 or 7 or whatever the max is.

As an aside/reference for other sound issues with LisaEm:

(I know from your screenshot that you're using MacOS so the following doesn't apply to you, this section is for future reference for others who might be searching LisaList2 for sound issues.)
There is an issue on GTK (Linux, FreeBSD, etc.) with wxWidgets where, wxWidgets needs to be compiled with LibSDL in order for sound to work. see: https://docs.wxwidgets.org/trunk/classwx_sound.html
"Currently this class is implemented on Windows and Unix and can use either Open Sound System (OSS) or Simple DirectMedia Layer (SDL) under the latter. Notice that OSS is not provided any more by most, and maybe even all, Linux systems in 2017 and osspd (OSS Proxy Daemon) package typically needs to be installed to make it work."

So if you're on Linux/FreeBSD, you'll likely need the  pulseaudio/ALSA proxy package bridges installed as well. I know, it's a mess.
All that said, I've seen sounds fail on Windows and MacOS as well.

But generally if you can hear the sound effects in LisaEm, clicks, floppy, etc., and you've said you did in this thread, you should hear the beeps from the Lisa Boot ROM and LOS/LPW as well.
« Last Edit: January 28, 2022, 09:06:54 am by rayarachelian »
Logged
You don't know what it's like, you don't have a clue, if you did you'd find yourselves doing the same thing, too, Writing the code, Writing the code

compu_85

  • Sr. Member
  • ****
  • Karma: +66/-0
  • Offline Offline
  • Posts: 233
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #4 on: January 28, 2022, 09:54:23 am »

You can access the preferences window within the workshop too - I believe it's under the System heading.
Logged

kewatsdop

  • Full Member
  • ***
  • Karma: +8/-0
  • Offline Offline
  • Posts: 28
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #5 on: January 28, 2022, 10:02:17 am »

Thank you both for trying to help!

I did access the Preferences window, and I can hear the sound being played when setting the volume low/up, but the program above still doesn't give me any sound. I did play with frequency/duration values, to no avail.

If that helps in anything, I'm using macOS Monterey, lisaem-1.2.7-RC3a-2020.08.24, Workshop 3.0.

Logged

rayarachelian

  • Administrator
  • Hero Member
  • *****
  • Karma: +101/-0
  • Offline Offline
  • Posts: 772
  • writing the code,writing the code,writing the code
    • LisaEm
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #6 on: January 28, 2022, 10:37:44 am »

Welp, I'm out of ideas. :(
Logged
You don't know what it's like, you don't have a clue, if you did you'd find yourselves doing the same thing, too, Writing the code, Writing the code

kewatsdop

  • Full Member
  • ***
  • Karma: +8/-0
  • Offline Offline
  • Posts: 28
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #7 on: January 28, 2022, 12:29:56 pm »

Thank you for trying to help though...

I'll give it another try during the weekend on my Windows machine, with exactly the same steps, and will update us here.
Logged

rayarachelian

  • Administrator
  • Hero Member
  • *****
  • Karma: +101/-0
  • Offline Offline
  • Posts: 772
  • writing the code,writing the code,writing the code
    • LisaEm
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #8 on: January 28, 2022, 01:25:25 pm »

Thank you for trying to help though...

I'll give it another try during the weekend on my Windows machine, with exactly the same steps, and will update us here.

Sure thing. Pro tip, you can just copy the lisaem-profile.dc42 file from your Mac to your Windows machines. You won't be able to copy the preferences file, which on macos is in plist format (I think), but on Windows will be a .ini file, but you can manually copy the LisaEm preferences, etc.

If you want, could you create a blank dc42 floppy in LisaEm and use the LPW F)ile menu to copy both the source code and the compiled program to this new floppy image, and then once you eject that floppy image from LPW, upload it here. If I have time this weekend, I can poke at it and see what happens.

(I can compile LisaEm with debug enabled and add some code around the sound generation routines to see if LisaEm notices sound being invoked, and what frequency, etc.)
Logged
You don't know what it's like, you don't have a clue, if you did you'd find yourselves doing the same thing, too, Writing the code, Writing the code

kewatsdop

  • Full Member
  • ***
  • Karma: +8/-0
  • Offline Offline
  • Posts: 28
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #9 on: January 28, 2022, 02:09:17 pm »

Sure will do. Thank you Ray for helping. Also in about 10-12 days from now I'll have an opportunity to test this on a physical Lisa...

I will have other newbie questions too, but not sure if I should start a separate thread; I'm new to this forum and don't know the local netiquette. One thing for example is why, no matter how I try, I cannot set the 6552 Shift Register to any value in assembly code. I'm trying to do e.g. MOVE d0, $00FCDD81 or MOVE d0, $0000DD81 (documentation says sometimes former, sometimes latter for the VIA memory location) plus $14 offset to access the Shift Register and it always gives me ADDRESS ERROR when running the program from Pascal. Any ideas what I'm doing wrong? Sorry if this is not for this thread, will start a new one if needed.
Logged

rayarachelian

  • Administrator
  • Hero Member
  • *****
  • Karma: +101/-0
  • Offline Offline
  • Posts: 772
  • writing the code,writing the code,writing the code
    • LisaEm
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #10 on: January 28, 2022, 03:28:51 pm »

I've split the reply to this new topic (writing directly to the VIA) to this post: https://lisalist2.com/index.php/topic,242.0.html
Logged
You don't know what it's like, you don't have a clue, if you did you'd find yourselves doing the same thing, too, Writing the code, Writing the code

kewatsdop

  • Full Member
  • ***
  • Karma: +8/-0
  • Offline Offline
  • Posts: 28
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #11 on: January 28, 2022, 04:35:45 pm »

Thank you Ray, will follow in both threads. But somehow I cannot add my answer to the other thread ("Database Error").
Logged

blusnowkitty

  • Sr. Member
  • ****
  • Karma: +69/-0
  • Offline Offline
  • Posts: 244
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #12 on: January 28, 2022, 05:22:32 pm »

Thank you Ray, will follow in both threads. But somehow I cannot add my answer to the other thread ("Database Error").

SMF (forum software) doesn't like the enhanced character set that OS X/iOS uses for things like apostrophes.
Logged
You haven't lived until you've heard the sound of a Sony 400k drive.

kewatsdop

  • Full Member
  • ***
  • Karma: +8/-0
  • Offline Offline
  • Posts: 28
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #13 on: January 28, 2022, 05:29:36 pm »

Indeed, thank you blusnowkitty. I managed to upload my comment when I removed my m-dashes.
Logged

kewatsdop

  • Full Member
  • ***
  • Karma: +8/-0
  • Offline Offline
  • Posts: 28
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #14 on: January 29, 2022, 09:10:30 am »

I started a new thread on being unable to mount a diskette, plus one more on not seeing a *.dc42 image from Mac on a Windows installation.
« Last Edit: January 29, 2022, 09:44:59 am by kewatsdop »
Logged
Pages: [1] 2   Go Up