Jump to content

Pengwin

Members
  • Content Count

    856
  • Joined

  • Last visited

Posts posted by Pengwin


  1. I have this piece of code:

     

    ; Routine to load the next level
    level_vec .word $0000
    scrn_vec .word GameScreen + $28
    outchar  .byte $00
    loadlevel inc level   ;Increment the level
      lda #$05   ;If the level is now 5, then set it back to 1
      cmp level
      beq levelok
      lda #$01
      sta level
    levelok  ldx level	 ;Load the level and reduce it by 1
      dex level
      txa	 ;Multiply the level by 2 for the offset
      asl
      tax
      lda lvlvectors,x ;Get the address of the level data
      sta level_vec
      lda lvlvectors+1,x
      sta level_vec+1
      ldy #$00
    getscrnchr lda (level_vec),y   ; <---- THIS LINE HERE GENERATES THE ERROR
      cmp #$FF
      beq leveldone
      tax
      and #$0f
      clc
      adc #$40
      sta outchar
      txa
      lsr
      lsr
      lsr
      lsr
      tax
      lda outchar
    rptscrnchr cpx #$00
      beq getscrnchr
      sta (level_vec),y
      iny
      dex
      jmp rptscrnchr
     
      ;  ++++++ HERE ++++++
    leveldone lda #$00   ;Temporary instruction
      rts
    

     

    I know it's probablu quite messy, but this is my first real assembly project.

    However, when I try to run the assembler, it tells me that I have an illegal addressing mode on the indicated line. I though that indirect-indexed was allowed for LDA.

     

    Any help please


  2. DLI's happen on the last line (or only line) for the specified mode, allowing you to make changes before the next line starts. Usually a WSYNC is used to align with the HBLANK area.

     

    http://www.atariarch...ere/chapt05.php

     

    Right, so if I have a displaylist containing:

    ...,135,2,...

    Then, if I make a colour change, it won't effect the mode 7 line that the interrupt is on, but it will effect the mode 2 line following it. Is that right?

     

    Sorry if these are basic questions, but I've not really dealt with interrupts before.


  3. Thanks for the tip Rybags. I can't use Altirra though (I'm on a mac), but atari800MacX does have a decent monitor and debugger.

    What I discovered is that the displaylist, which should be entered into memory with

     

     

    DATA($7000)
    [
     112,112,112,71,232,148
     7,7,7,6,6,6,6,7,7,7,65,0,112
    ]
    

     

    doesn't seem to be in memory. Not sure why. I tried out one of the demo games that is available on the AtariWiki, and that fails to put the display list in memory. Looks like there could be a problem with Quick itself.

     

    Edit: Just tried with Quick 2.1 (I was using 2.2) and the data is now being stored in memory.


  4. I need some help fro anyone out there who knows Quick.

     

    I have taken a page from XXL's book and am trying to port some simple spectrum games to A8. Unlike XXL, I am not using assembly, I will be using the Quick language. In theory, this should be straight forward, but I have already hit a snag.

     

    I am trying to create a custom display list (actually, there will be 2 in the game, but one at a time here).

    I 'think' it is creating the correct list, but when I try to poke a character to the screen, I get nothing.

    I tried virtually the same in TurboBasic and I got a character on the screen. Could any one help?

     

    I am posting the code to both the Quick and the TurboBasic versions so maybe someone could see something.

     

    Quick Code

    BYTE
    [
     DMACTL=559
    ]
    WORD
    [
     SDLSTL=560
     MENUDLI
     MENUSCRN
    ]
    * FRONT MENU DISPAY LIST
    DATA($7000)
    [
     112,112,112,71,232,148
     7,7,7,6,6,6,6,7,7,7,65,0,70
    ]
    MAIN
     MENUDLI=$7000
     MENUSCRN=$94E8
     .FRONTMENU
    ENDMAIN
    
    * DISPLAY FRONT SCREEN
    PROC FRONTMENU
    LOCAL
    WORD
    [
     PKPOS
    ]
    BEGIN
     DMACTL=0
     SDLSTL=MENUDLI
     DMACTL=34
     CLR($70,1)
     ADD(MENUSCRN,56,PKPOS)
     POKE(PKPOS,65)
    ENDPROC
    

     

    TurboBasic Code

    1 DMACTL=559:SDLSTL=560:MENUDLI=28672
    2 MENUSCRN=38123
    3 HSBMENU=INT(MENUDLI/256)
    4 LSBMENU=(MENUDLI-(HSBMENU*256))
    10 FOR F=0 TO 18
    20   READ A
    30   POKE MENUDLI+F,A
    40 NEXT F
    100 POKE DMACTL,0
    110 POKE SDLSTL,LSBMENU
    120 POKE SDLSTL+1,HSBMENU
    130 POKE DMACTL,34
    150 POKE MENUSCRN,99
    1000 DATA 112,112,112,71,232,148,7,7,7,6,6,6,6,7,7,7,65,0,70
    

     

    Any help would be very greatly appreciated.


  5. Strange I never saw this thread before, even stranger that I found out about these 'electronic novels' last night.

    Thanks to Sio2OSX, I am going to give the one not mentioned yet a try, Brimstone.

     

    If anyone is interested, I'll post my thoughts in this thread when I've had a chance to really get to grips with it.

     

    Like Gunstar, I would also like to get hold of originals of these, but I've never seen them in the wild.


  6. I'm playing Bounty Bob right now, and I just did a 'head-count' of the number of sprites that are definitely PMGs. I count 6. Now, I know a fifth player can be created by combining missiles, or even 2 small sprites by making 2 pairs of missiles, but these appear to be full size players.

    Am I right in thinking that this can be achieved by creating multiple copies of the sprite image in a single player, then changing the horizontal position of the player by using a DLI? or doesn't this apply to PMGs?

×
×
  • Create New...