Welcome, Guest. Please login or register.

Author Topic: Mr Beanbag not working with accelerator  (Read 5417 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Mrs Beanbag

  • Sr. Member
  • ****
  • Join Date: Sep 2011
  • Posts: 455
    • Show all replies
Re: Mr Beanbag not working
« on: January 25, 2012, 04:35:17 PM »
I've read this on a few forums, it's an odd one.  I have a 1260 myself and it runs fine here without disabling caches.  I'd like to get this fixed as a priority but I need to know all the details:

1. are there any error messages/ guru error numbers?
2. at what point does the crash happen, before the splash screen, after the title screen etc..?
3. are you running from floppy, workbench icon or command line?  (if workbench, try command line.  You have to CD to its own directory so it can find its datafile)
4. do you have any other software running in the background?  Try deactivating everything else, or boot with no startup sequence and type "loadwb" to run it with the most basic setup possible...
« Last Edit: January 25, 2012, 04:38:00 PM by Mrs Beanbag »
Signature intentionally left blank
 

Offline Mrs Beanbag

  • Sr. Member
  • ****
  • Join Date: Sep 2011
  • Posts: 455
    • Show all replies
Re: Mr Beanbag not working
« Reply #1 on: January 25, 2012, 10:05:32 PM »
Try booting normally, but running the game from the shell.

I suspect the problem is in my Workbench initialisation code.  I copied it from somewhere and I never really understood it, worked on my setup though :confused:
Signature intentionally left blank
 

Offline Mrs Beanbag

  • Sr. Member
  • ****
  • Join Date: Sep 2011
  • Posts: 455
    • Show all replies
Re: Mr Beanbag not working
« Reply #2 on: January 25, 2012, 11:16:11 PM »
I'll try and sort it this weekend.  Working blind here though...
Signature intentionally left blank
 

Offline Mrs Beanbag

  • Sr. Member
  • ****
  • Join Date: Sep 2011
  • Posts: 455
    • Show all replies
Re: Mr Beanbag not working
« Reply #3 on: January 26, 2012, 01:36:35 PM »
Quote from: Leffmann;677535
I also found that pressing the keyboard causes the game to crash, something with the keyboard interrupt or VBR not taken into account maybe, and also your logo in the beginning will just flash briefly on faster CPUs.

If you don't care about tool-types or command line arguments, then the attached file shows how to make programs WB-friendly:

Thanks for that.  I've no clues on the keyboard thing though, I use keys to do various things in the development build of the game (and Esc takes you back to the title screen), I haven't noticed it crash, although I am aware that my keyboard handling code is very much a hack, I should probably get round to doing that properly as well but it was never a priority until now.

p.s. please report bugs on our website here so we can keep track of them all in one place!
http://www.glastonbridge.co.uk/mrbeanbag/showpost.php?id=14454
« Last Edit: January 26, 2012, 01:37:55 PM by Mrs Beanbag »
Signature intentionally left blank
 

Offline Mrs Beanbag

  • Sr. Member
  • ****
  • Join Date: Sep 2011
  • Posts: 455
    • Show all replies
Re: Mr Beanbag not working
« Reply #4 on: January 26, 2012, 09:30:38 PM »
I've cleaned up my WB init code using Leffmann's source, you can download the patched version here:
http://www.glastonbridge.co.uk/mrbeanbag/downloads/BeanBag_PatchOS3_9.lha

I don't know if it will make a difference after Paul suggested that FBlit may be the culprit, but I did realise that I was opening dos.library before calling the initialisation code, so it could also be that OS3.9 doesn't like that for some reason.

EDIT: strange if it's FBlit though, the game doesn't use any OS blitter functions, only hits the hardware directly.  Except for "ownblit" at the start and "disownblit" at the end!  If anyone has any hints and tips for making it play nicely with FBlit they will be gratefully received.
« Last Edit: January 26, 2012, 09:41:25 PM by Mrs Beanbag »
Signature intentionally left blank
 

Offline Mrs Beanbag

  • Sr. Member
  • ****
  • Join Date: Sep 2011
  • Posts: 455
    • Show all replies
Re: Mr Beanbag not working
« Reply #5 on: January 26, 2012, 11:53:14 PM »
oh and regarding the keyboard handler, I've had terrible difficulty finding any good information about how to read the keyboard properly, I have three Amiga programming books and none of them say anything useful on the subject :confused:

I found this post on EAB though:
http://eab.abime.net/showthread.php?p=791956

I take it that code would suit my needs, I'd need to turn the relevant interrupt back on though I guess?
Signature intentionally left blank
 

Offline Mrs Beanbag

  • Sr. Member
  • ****
  • Join Date: Sep 2011
  • Posts: 455
    • Show all replies
Re: Mr Beanbag not working
« Reply #6 on: January 27, 2012, 06:19:49 PM »
Quote from: Leffmann;677753
I'm guessing you pause the AmigaOS and go directly on the hardware in the game, so it's probably easier to poll the keyboard hardware manually

Yes this is the case.  I shall try your code this weekend and see how it goes, but as I say it never crashed my computer although sometimes the keyboard would freeze up for a few seconds and then all the key presses would come through at once.  Weird.  I'll have to rely on you to test it for me though.

Oh and sorry to use you as a kind of living coding reference here but could you give me some idea of how to use UnLoadSeg?  I take it this is the right function to use, basically the problem is, Mr Beanbag's executable is compressed in my own format, the decompression header reserves some memory, decompresses the data into it, and then jumps into it.  But that leaves the compressed data still sitting in memory, uselessly.  I want to be able to free it back up since it's not used anymore, but it's part of the executable.
Signature intentionally left blank
 

Offline Mrs Beanbag

  • Sr. Member
  • ****
  • Join Date: Sep 2011
  • Posts: 455
    • Show all replies
Re: Mr Beanbag not working
« Reply #7 on: January 28, 2012, 12:19:48 AM »
I did think of that, but all too late I'm afraid, it means re-writing my compression algorithm, and then re-compressing everything... it stores the bitstream and literal bytes separately for speed.

So to get the address of the segment I just subtract 4 from the start address of the program?  There is only one segment so unlinking is trivial.  I'll give it a try, I'll know it hasn't worked if it crashes...
Signature intentionally left blank
 

Offline Mrs Beanbag

  • Sr. Member
  • ****
  • Join Date: Sep 2011
  • Posts: 455
    • Show all replies
Re: Mr Beanbag not working
« Reply #8 on: January 28, 2012, 03:00:22 PM »
Quote from: Leffmann;677851
Been playing with this a bit and to save you from wasting your time I can say it doesn't work reliably. It never crashes, but there's always a leak of 16 bytes when the program quits, hinting that something else could be terribly wrong.

Hmm I noticed that AMOS leaks 16 bytes every time you quit it as well, I wonder if that's doing the same thing...

I'll have a rethink of my compression algorithm, but unless I come up with something revolutionary we can probably deal with the loss of 18k...
Signature intentionally left blank
 

Offline Mrs Beanbag

  • Sr. Member
  • ****
  • Join Date: Sep 2011
  • Posts: 455
    • Show all replies
Re: Mr Beanbag not working with accelerator
« Reply #9 on: January 29, 2012, 02:27:55 PM »
Quote from: Cammy;678074
I hope Mrs.Beanbag doesn't mind me uploading this, I can take it down if you want. I have compiled a CD32 bootable disc with Mr. Beanbag on it, including the latest executable, the Halloween demo and the new Burns Night demo.

Simply burn the ISO with any CD burning program and pop the disc in your CD32, leave it for a few seconds and the regular version of Mr. Beanbag will run. If you hold the Green or Yellow button after you put the disc in it will load the Halloween demo. If you hold the Red button it will load the Burns Night demo, and if you hold the Blue button it will run the latest executable, which is the full game but it says "Burns Night" in the menu, even though it will go to the regular map screen.

If you quit from the game, you can use the control pad to move the mouse around and click on the OK button.

You can download it here:  http://amigachristmastree.ultimateamiga.co.uk/MrBeanbag.iso

Oh oops, I forgot to put the menus back!  Silly me.  That means you also won't get codes/continues.  Some people would like that though.

No I don't mind at all.  As a priority I should get the "special stages" menu working so there'd be no need for all this red button/green button stuff.
Signature intentionally left blank
 

Offline Mrs Beanbag

  • Sr. Member
  • ****
  • Join Date: Sep 2011
  • Posts: 455
    • Show all replies
Re: Mr Beanbag not working with accelerator
« Reply #10 on: January 29, 2012, 03:16:31 PM »
Quote from: AmigaClassicRule;678107
Mrs Beanbag is it too much to ask, if...if you can provide us with a workbench version of a full blown Mrs beanbag editor where we can make our levels and share them in the community? That would rule!!

Of course I am more than happy to order it and receive the program in a media disk by mail.

I am actually planning this, when I get the time.  It's a fairly low priority at the moment though, I hope you understand.  First things first is to make the main executable able to load alternate levels from the menu!  Then many things become possible.
Signature intentionally left blank