• Welcome to PCEngine-FX.com. Please log in.
 

RIP to BT Garner of MindRec.com... BT passed away early 2023 from health problems. He was one of the top PCE homebrew developers and founder of the OG Turbo List, then PCECP.com. Condolences to family and friends.
IMG
IMG
Main Menu

bm_delete()... what's wrong with it?

Started by OldRover, 03/28/2014, 06:05 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

OldRover

Supposedly, there is an error with the bm_delete() library function. I don't know enough about the underlying code to figure out where the issue is, and I have not used it yet so I don't know its symptoms.

lib2_bm_delete:
__stw <_ax
  jsr lib2_bm_open
  bcs .out
  stw $8006,<_bx ; ptr to end
  stw <_si,<_di ; setup currptr as dest
  stw <_dx,<_si ; setup nextptr as src
  subw <_dx,<_bx ; #bytes = end-next + 2
  addw #2,<_bx
  subw <_cx,$8006 ; adjust ptr to end
  lda <_bh
  ldx <_bl
  jsr _memcpy.3
  jsr lib2_bm_disable
  stz _bm_error
  clx
  cla
  clc
.out:   rts

EDIT: an old thread on the ME forum sheds some light on the issue:
http://forums.magicengine.com/en/viewtopic.php?t=1744
Turbo Badass Rank: Janne (6 of 12 clears)
Conquered so far: Sinistron, Violent Soldier, Tatsujin, Super Raiden, Shape Shifter, Rayxanber II

OldRover

    lda   _Nulltard
    ldx   _bullets
    inx
    txa
    sbc   _Nulltard
    jsr   _cheap_funeral
    nop
    rts

:P :lol:
Turbo Badass Rank: Janne (6 of 12 clears)
Conquered so far: Sinistron, Violent Soldier, Tatsujin, Super Raiden, Shape Shifter, Rayxanber II

OldRover

Yeah, I got the joke. :P :lol: BM, bowel movement, flush it down the toilet. :P
Turbo Badass Rank: Janne (6 of 12 clears)
Conquered so far: Sinistron, Violent Soldier, Tatsujin, Super Raiden, Shape Shifter, Rayxanber II