ENTERPRISE KLUB
2024. március 2.,  14-19 óráig
1074 Budapest, Károly krt. 3/A.
Részletek
Welcome, Guest. Please login or register.


Author Topic: Enterprise program: Bricky Prise (Read 19696 times)

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7025
  • Country: hu
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #15 on: 2016.April.02. 20:23:09 »
Update: Random level generation between level 2-39.
Left shift: changes the ball's direction a bit, it is useful if the ball is remaining in the same way, and cannot reach the bat.
Package updated at downloads, and all related links have been refreshed in this topic.
« Last Edit: 2016.April.02. 22:09:55 by szipucsu »

Offline gflorez

  • EP addict
  • *
  • Posts: 3594
  • Country: es
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #16 on: 2016.April.12. 11:30:15 »
A curiousity with the game is that to pass the title screens it can be done with both mouse buttons, bit 1 and 2(K and L columns) of row 0, not commonly used.

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7025
  • Country: hu
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #17 on: 2016.April.12. 14:46:34 »
A curiousity with the game is that to pass the title screens it can be done with both mouse buttons, bit 1 and 2(K and L columns) of row 0, not commonly used.
You asked it to check b0,b1,b3 earlier , and I have done it :)

Offline gflorez

  • EP addict
  • *
  • Posts: 3594
  • Country: es
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #18 on: 2016.April.12. 17:20:02 »
This means you are considering to adapt your beautiful game to EnterMice movement?, the honour to make the first game that use a mouse in the EP history....?

But wait, I already know your  actual answer....

Meanwhile, let me try to convince you.....

This is a MSX mouse routine(Boxsoft, Entermice, all are the same), that only reads X increment and two buttons. It must be called at least every 1/50 sec or more to work. It takes almost half the time of the entire MSX routine, only two cycles of lectures on the B6h port, and is used also to read the Joystick 1 at the same time:

Code: [Select]
MSX:        
                        ld hl, X_REL           ;first byte, X displacement since last lecture
ld b,3 ;long delay
                        di
call READ_8BIT
                        ei
   ;                          Y movement not used here
xor a
out (0B5h), a             ; row 0
in a, (0B6h)
and 7                       ;bits 2, 1 and 0
xor 7
srl a ; here the status of J column is on carry
rl c        ; J column is saved in c
srl a
rl b ; K column is saved in b
               Inc hl
       ld (hl), a ; L column is the right SECBUTT_STATUS
inc hl
ld a,b
ld (hl), a ; K column is the Left MAINBUTT_STATUS
inc hl
ld a,c
                        ld (hl), a       ; Joy 1 movement and fire is now on JOY1_STATUS(000RLDUF)
                        ret
WAIT:
nop
nop
nop
dec b
jr nz, WAIT
ret
;
READ_8BIT:          ld a,2                   ;RTS low
out (0B7h), a
call WAIT_READ_4BIT     ; read four higher bits
xor a                           ;RTS high
out (0B7h), a
ld b, 2                         ;short delay
ld c,0;           c is reset as we only need to read joy 1 on the second nibble
WAIT_READ_4BIT:call WAIT ;leaves B=0
READ_4BIT:
ld d, b ;d=0
ld b, 4

READ_LOOP:
ld a, b
out (0B5h), a
in a, (0B6h)
rra
ccf                 ; we need joy 1 port complemented
rl  c ;data is read from L column
rra
rl d ;data is read from K column
djnz READ_LOOP

ld a, d
rld
ret

X_REL: db 0
SECBUTT_STATUS:                 db 0
MAINBUTT_STATUS;                db 0
JOY1_STATUS:        db 0



Still not tested. Once returned you can limit the increments to make the game more hard, like with the joystick.
« Last Edit: 2016.April.12. 23:56:41 by gflorez »

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7025
  • Country: hu
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #19 on: 2016.April.13. 08:53:43 »
In the beginning I planned, and Zozo asked it also, but at the end i decided to do not implement it, because of space issues, and the mouse would work also like a joystick, the program would not check the speed of the mouse, just the direction.

Offline IstvanV

  • EP addict
  • *
  • Posts: 4822
Re: Enterprise program: Bricky Prise
« Reply #20 on: 2016.April.13. 09:40:30 »
For more space, it would be possible to use about 1 KB from the EXOS stack (FF:AC00-AFFF). Also, compressing the two largest blocks with epcompress -raw -m0 -9 instead of the default -5 saves 68 bytes. That is not much, but it is better than nothing. And the code from decompress_m0.s could probably be optimized better for both size and speed. :oops:

Offline gflorez

  • EP addict
  • *
  • Posts: 3594
  • Country: es
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #21 on: 2016.April.13. 10:03:57 »
You don't need to check mouse speed, only cut increments greater than a given magnitude. For example, the mouse can return you +127 to -128 increments, but you can put the top on +10 to -10, i.e. greater than that are cut to  ± 10.

This will give the max speed you want.


You even can exaggerate the speed to make the game more difficult.

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7025
  • Country: hu
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #22 on: 2016.April.13. 13:33:33 »
For more space, it would be possible to use about 1 KB from the EXOS stack (FF:AC00-AFFF). Also, compressing the two largest blocks with epcompress -raw -m0 -9 instead of the default -5 saves 68 bytes. That is not much, but it is better than nothing. And the code from decompress_m0.s could probably be optimized better for both size and speed. :oops:
Hmm, i have played with compression levels only in the beginning in the last few years i always used the default :ooops
There would be enough space for the code I think, because I found about 340h bytes fre in the 3rd video page, now about 200h is free, but i do not see advantage of implementing mouse, because there is no speed check in the game only direction, if you move the joy into a direction then the bat moves 1 unit into that direction, if you press fire also then it moves 2 units.
We could save probably more space by optimizing game code (possibly speed also :D ), i am not a great coder, something I can do, and a lot of things I can't :D ( and do not check the code :D )

Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7025
  • Country: hu
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #23 on: 2016.April.13. 13:35:23 »
You don't need to check mouse speed, only cut increments greater than a given magnitude. For example, the mouse can return you +127 to -128 increments, but you can put the top on +10 to -10, i.e. greater than that are cut to  ± 10.

This will give the max speed you want.


You even can exaggerate the speed to make the game more difficult.
Yes, but in this case you can switch Entermice into joystick mode, and the mouse is working as a joystick (if I know well this option exists in entermice also ) this is the reason why i do not see advantage of implementing the mouse.

Offline gflorez

  • EP addict
  • *
  • Posts: 3594
  • Country: es
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #24 on: 2016.April.13. 14:20:07 »
Even if you limit the increments as I said, the result is not the same as joystick emulation.

Movement with mouse is more accurate and softer. You command the bat to directly stay where you intuitively want it to be, not the direction where you want it to go.

I remember the original Arkanoid arcade machine to have a rotary controller to move the bat. Is only for it that I insist so much....


Offline geco

  • Moderator
  • EP addict
  • *
  • Posts: 7025
  • Country: hu
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #25 on: 2016.November.10. 19:46:00 »
B D F character could not be chosen bug repaired at entering hi score, repaired version

Offline IstvanV

  • EP addict
  • *
  • Posts: 4822
Re: Enterprise program: Bricky Prise
« Reply #26 on: 2016.November.16. 20:35:21 »
Even if you limit the increments as I said, the result is not the same as joystick emulation.

Movement with mouse is more accurate and softer. You command the bat to directly stay where you intuitively want it to be, not the direction where you want it to go.

Bricky Prise with mouse support:
[ Guests cannot view attachments ]

This is a rather ugly hack, however, and it may crash or have other problems (edit: it definitely breaks the digital sound effects), it is only to show what the game might be like when controlled with a mouse. The movement speed is limited to +/- 4, twice as fast as what is possible with the keyboard, but this range could easily be changed.
« Last Edit: 2016.November.16. 21:33:29 by IstvanV »

Offline endi

  • EP addict
  • *
  • Posts: 7298
  • Country: hu
  • grafikus, játékfejlesztõ, programozás, scifi, tudományok, vallás
    • Honlapom
Re: Enterprise program: Bricky Prise
« Reply #27 on: 2016.November.16. 21:02:37 »
újabb emu-s snapshotot légyszi :)
Vigyázat! Szektás vagyok! :)

Offline IstvanV

  • EP addict
  • *
  • Posts: 4822
Re: Enterprise program: Bricky Prise
« Reply #28 on: 2016.November.16. 21:30:37 »
újabb emu-s snapshotot légyszi :)

:???:

Offline gflorez

  • EP addict
  • *
  • Posts: 3594
  • Country: es
    • Támogató Támogató
Re: Enterprise program: Bricky Prise
« Reply #29 on: 2016.November.16. 22:12:43 »
I like your ugly hack!

With  +-4 it seems more or less as difficult as the joystick controller.

It is a wonderful game, even more when played with a mouse.