@@ -241,7 +241,7 @@ SUB CLS256(byval colour as ubyte)
241241 pop bc
242242
243243 end asm
244- end sub
244+ end Sub
245245
246246
247247' - PlotL2 ------------------------------------------------
@@ -256,35 +256,35 @@ end sub
256256' y (UByte): Y coordinate from top (0-191)
257257' c (Ubyte): Pixel colour index (0-255)
258258' ---------------------------------------------------------
259- SUB fastcall PlotL2( byVal x as ubyte, byval y as ubyte, byval c as ubyte)
260- ASM
259+ Sub fastcall PlotL2( ByVal x As ubyte, ByVal y As ubyte, ByVal c As ubyte)
260+ ASM
261261 ;BREAK
262- ld bc,LAYER2_ACCESS_PORT
262+ ld bc, LAYER2_ACCESS_PORT
263263 pop hl ; save return address
264- ld e,a ; put a into e
264+ ld e, a ; put a into e
265265 pop af ; pop stack into a
266- ld d,a ; put into d
267- and 192 ; yy00 0000
268-
269- or 3 ; yy00 0011
270- out (c),a ; select 8 k-bank
271- ld a,d ; yyyy yyyy
272- and 63 ; 00 yy yyyy
273- ld d,a
266+ ld d, a ; put into d
267+ And 192 ; yy00 0000
268+
269+ Or 3 ; yy00 0011
270+ out (c),a ; Select 8 k-bank
271+ ld a, d ; yyyy yyyy
272+ And 63 ; 00 yy yyyy
273+ ld d, a
274274 pop af ; get colour/map value
275- ld (de),a ; set pixel value
275+ ld(de),a ; Set pixel value
276276
277- ld a, 2 ; 0000 0010
278- out (c),a ; select ROM?
277+ ld a, 2 ; 0000 0010
278+ out (c),a ; Select ROM?
279279 push hl ; restore return address
280280
281281; 6 - 7 Video RAM bank select
282282; 3 Shadow Layer 2 RAM select
283283; 1 Layer 2 visible
284284; 0 Enable Layer 2 write paging
285285
286- END ASM
287- end sub
286+ End ASM
287+ End Sub
288288
289289
290290' - ScrollLayer -------------------------------------------
@@ -296,7 +296,7 @@ end sub
296296' x (UByte): Horizontal offset
297297' y (UByte): Vertical offset
298298' ---------------------------------------------------------
299- SUB FASTCALL ScrollLayer( byval x as ubyte, byval y as ubyte)
299+ Sub FASTCALL ScrollLayer( byval x as ubyte, byval y as ubyte)
300300 asm
301301 PROC
302302 pop hl ; store ret address
@@ -344,16 +344,16 @@ sploop:
344344 djnz sploop
345345 ENDP
346346 end asm
347- END SUB
347+ END Sub
348348
349349
350- ' - InitSprites - ------------------------------------------
350+ ' - RemoveSprite ------------------------------------------
351351' Deletes (makes disappear) a sprite from the screen
352352' Parameters:
353353' spriteId (UByte): Identifier of the sprite to hide
354354' visible (UByte): 0 = Hidden, 1 = Visible
355355' ---------------------------------------------------------
356- SUB RemoveSprite(spriteid AS UBYTE, visible as ubyte)
356+ Sub RemoveSprite(spriteid AS UBYTE, visible as ubyte)
357357 ASM
358358 push bc
359359 ld a,(IX+ 5 ) ; get ID spriteid
@@ -373,10 +373,10 @@ SUB RemoveSprite(spriteid AS UBYTE, visible as ubyte)
373373 out (c), a
374374 pop bc
375375 END ASM
376- END SUB
376+ END Sub
377377
378378
379- ' - InitSprites - ------------------------------------------
379+ ' - UpdateSprite ------------------------------------------
380380' Updates the position and properties of the sprite on the screen.
381381' The sprites are printed from the hardware top-left edge of the Next.
382382' To place a sprite at position 0,0 in Layer 2, you must point to 32,32.
@@ -385,17 +385,17 @@ END SUB
385385' x (UByte): Vertical position of the sprite (0-255) - (32-223)
386386' spriteId (UByte): Identifier of the sprite to hide
387387' pattern (UByte): Number of element to use for the sprite within the sprite set
388- ' mflip (UByte): Attribute 2 of the sprite. Bits: PPPXYRH
388+ ' mflip (UByte): Attribute 2 of the sprite (0=default) . Bits: PPPXYRH
389389' PPPP = Palette offset for the sprite
390390' X = Horizontal mirror, 0 = Off, 1 = On
391391' Y = Vertical mirror, 0 = Off, 1 = On
392392' R = Rotation, 0 = None, 1 = 90 degrees clockwise
393393' H = Ignored
394- ' anchor (UByte): Attribute 4 of the sprite. Bits: ---ZXZY-
394+ ' anchor (UByte): Attribute 4 of the sprite (0=default) . Bits: ---ZXZY-
395395' ZX: Horizontal zoom factor (0-3)
396396' ZY: Vertical zoom factor (0-3)
397397' ---------------------------------------------------------
398- sub UpdateSprite( ByVal x AS uinteger, ByVal y AS UBYTE, ByVal spriteid AS UBYTE, ByVal pattern AS UBYTE, ByVal mflip as ubyte, ByVal anchor as ubyte)
398+ Sub UpdateSprite( ByVal x AS uinteger, ByVal y AS UBYTE, ByVal spriteid AS UBYTE, ByVal pattern AS UBYTE, ByVal mflip as ubyte, ByVal anchor as ubyte)
399399 ' 5 7 9 11 13 15 17
400400 ' http://devnext.referata.com/wiki/Sprite_Attribute_Upload
401401 ' Uploads attributes of the sprite slot selected by Sprite Status/Slot Select ($303B).
@@ -625,8 +625,9 @@ SUB LoadSD(byval filen as String,ByVal address as uinteger,ByVal length as uinte
625625 filen = filen + chr( 0 )
626626 tlen=len(filen)+ 1
627627 dim cco as ubyte= 0
628- asm
629- ld hl,.LABEL._filename
628+
629+ asm
630+ ld hl,.LABEL._filename
630631 ld de,.LABEL._filename+ 1
631632 ld bc, 64
632633 ld (hl), 0
0 commit comments