Author Topic: rupture CPCtelera  (Read 2387 times)

0 Members and 1 Guest are viewing this topic.

Offline freemac

  • 464 Plus
  • *****
  • Posts: 374
  • Country: 00
    • Awards
rupture CPCtelera
« on: 12:10, 17 December 20 »
Following https://www.cpcwiki.eu/forum/programming/rupture/ and https://amstradplus.forumforever.com/t319-Programmez-vos-ruptures-facilement.htm

I realise my first rupture using CPCtelera, at top &4000, and at bottom &C000 :
cpctelera_rupture.png
* cpctelera_rupture.png
(Filesize: 35.37 KB, Dimensions: 774x613, Views: 228)


https://github.com/renaudhelias/CPCtelera-schtroumpfs/releases/tag/CPCtelera-schtroumpfs_v0.1
hellorenaud.dsk => run"launch

txt_scroll.c
Code: [Select]
unsigned int vblPosition=0;

/**
 * Après un VSYNC qui met à 0 le compteur 6tics d'interruption.
 */
void killVBL() {
__asm
       ld bc,#0xbc07 ; Kill VBL
       ld a,#0x7f
       out (c),c
       inc b
       out (c),a
__endasm;
vblPosition=37;
}

void restoreVBL() {
__asm
       ld bc,#0xbc07 ; On repositionne la VBL
       ld a,(_vblPosition)
       out (c),c
       inc b
       out (c),a
__endasm;
}

/**
 * nbCharLigne 39 max
 **/
void rupture(unsigned char nbCharLigne) {
__asm
       ld bc,#0xbc04 ; Rupture 1
       ;;ld a,(_nbCharLigne)
ld hl, #2+0
add hl, sp
ld a, (hl)
       dec a
       out (c),c
       inc b
       out (c),a
__endasm;
vblPosition=vblPosition-nbCharLigne;
}

main.c
Code: [Select]
u8 intCounter=0;
void myInterruptHandler() {
   intCounter=intCounter+1;
   if (intCounter == 6) intCounter=0;

   if (intCounter == 2) {
cpct_setBorder(2);
   } else {
cpct_setBorder(3);
   }
if (intCounter==5) {
calqueC000();
killVBL();
rupture(19-1);
}
if (intCounter==2) {
calque4000();
restoreVBL();
rupture(39-19+1);
}
}
...
cpct_setInterruptHandler(myInterruptHandler);
while (1) {
      vsync();
      intCounter=0;
      //killVBL();
      //rupture(39);
      //restoreVBL();
   }
like
0
No reactions

Offline freemac

  • 464 Plus
  • *****
  • Posts: 374
  • Country: 00
    • Awards
Re: rupture CPCtelera
« Reply #1 on: 12:29, 17 December 20 »
 
cpctelera_rupture2.png
* cpctelera_rupture2.png
(Filesize: 27.47 KB, Dimensions: 776x614, Views: 202)
like
0
No reactions

Offline freemac

  • 464 Plus
  • *****
  • Posts: 374
  • Country: 00
    • Awards
Re: rupture CPCtelera
« Reply #2 on: 12:40, 17 December 20 »
The disk with FOND.SCR at &4000, and LAUNCH.BAS loading FOND.SCR
like
0
No reactions

Offline SRS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 660
  • Country: de
  • Schneider CPC464 - what else ?
    • Awards
Re: rupture CPCtelera
« Reply #3 on: 22:21, 17 December 20 »
Memory Full in 37 ...
if I REM Line 37 it seems to work well
like
0
No reactions

Offline freemac

  • 464 Plus
  • *****
  • Posts: 374
  • Country: 00
    • Awards
Re: rupture CPCtelera
« Reply #4 on: 10:57, 18 December 20 »
Memory Full in 37 ...
if I REM Line 37 it seems to work well
My bad  :-\
like
0
No reactions

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.254
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
    • Awards
like
0
No reactions
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcomed !