?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. ;original code by Cyberdemon^i8
  2. ;decompiled(used IDA Pro) and adapted for SjASMPlus by Aprisobal
  3. ;27.07.2006
  4.                 device zxspectrum128
  5.                
  6.                 org 8500h
  7.                 page 7
  8.                 ;our image here
  9. image:          inchob "killerbean2.$c"
  10.                 ;or incbin "KillerBean2.rgb"
  11.                 ;or incbin "scrshot7.rgb"
  12. .end:
  13.                 ;our viewer
  14.                 org 8200h
  15. ; ---------------------------------------------------------------------------
  16. start:          call    GenerateSubs
  17.                 ld      (loc_829A+1), sp
  18.                 xor     a
  19.                 out     (254), a
  20.                 halt
  21.  
  22. loc_820B:
  23.                 ld      bc, 7FFDh
  24.                 ld      a, 11000b
  25.                 out     (c), a
  26.                 ld      ix, loc_8219
  27.                 jp      loc_829F
  28. ; ---------------------------------------------------------------------------
  29.  
  30. loc_8219:
  31.                 ld      ix, loc_8220
  32.                 jp      loc_82A2
  33. ; ---------------------------------------------------------------------------
  34.  
  35. loc_8220:
  36.                 ld      ix, loc_822D
  37.                 ld      sp, 5A00h
  38.                 ld      de, 404h
  39.                 jp      loc_82A8
  40. ; ---------------------------------------------------------------------------
  41.  
  42. loc_822D:
  43.                 ld      sp, 8500h
  44.                 halt
  45.                 ld      bc, 7FFDh
  46.                 ld      a, 10000b
  47.                 out     (c), a
  48.                 ld      ix, loc_823F
  49.                 jp      loc_82A5
  50. ; ---------------------------------------------------------------------------
  51.  
  52. loc_823F:
  53.                 ld      ix, loc_824C
  54.                 ld      sp, 5B00h
  55.                 ld      de, 404h
  56.                 jp      loc_82AB
  57. ; ---------------------------------------------------------------------------
  58.  
  59. loc_824C:
  60.                 ld      bc, 7FFDh
  61.                 ld      a, 11h
  62.                 out     (c), a
  63.                 ld      ix, loc_825A
  64.                 jp      loc_829F
  65. ; ---------------------------------------------------------------------------
  66.  
  67. loc_825A:
  68.                 ld      sp, 5A00h
  69.                 ld      de, 101h
  70.                 ld      ix, loc_8267
  71.                 jp      loc_82A8
  72. ; ---------------------------------------------------------------------------
  73.  
  74. loc_8267:
  75.                 ld      sp, 8500h
  76.                 halt
  77.                 ld      sp, 5B00h
  78.                 ld      de, 101h
  79.                 ld      ix, loc_8278
  80.                 jp      loc_82AB
  81. ; ---------------------------------------------------------------------------
  82.  
  83. loc_8278:
  84.                 ld      ix, loc_827F
  85.                 jp      loc_82A2
  86. ; ---------------------------------------------------------------------------
  87.  
  88. loc_827F:
  89.                 ld      ix, loc_8286
  90.                 jp      loc_82A5
  91. ; ---------------------------------------------------------------------------
  92.  
  93. loc_8286:
  94.                 ld      sp, 8500h
  95.                 halt
  96.                 xor     a
  97.                 in      a, (0FEh)
  98.                 cpl
  99.                 and     1Fh
  100.                 jp      z, loc_820B
  101.                 di
  102.                 im      1
  103.                 ld      a, 3Fh ; '?'
  104.                 ld      i, a
  105.  
  106. loc_829A:
  107.                 ld      sp, 0
  108.                 ei
  109.                 ret
  110. ; ---------------------------------------------------------------------------
  111.  
  112. loc_829F:
  113.                 jp      0
  114. ; ---------------------------------------------------------------------------
  115.  
  116. loc_82A2:
  117.                 jp      0
  118. ; ---------------------------------------------------------------------------
  119.  
  120. loc_82A5:
  121.                 jp      0
  122. ; ---------------------------------------------------------------------------
  123.  
  124. loc_82A8:
  125.                 jp      0
  126. ; ---------------------------------------------------------------------------
  127.  
  128. loc_82AB:
  129.                 jp      0
  130. ; ---------------------------------------------------------------------------
  131.                 ei
  132.                 ret
  133.  
  134. ; --------------- S U B R O U T I N E ---------------------------------------
  135.  
  136.  
  137. GenerateSubs:
  138.                 ld      a, 10111b
  139.                 call    PageOut
  140.                 ld      hl, 0D800h
  141.                 ld      bc, 2FFh
  142.                 ld      a, 2
  143.                 call    IncDE
  144.                 ld      hl, 8500h
  145.                 ld      de, 1017h
  146.                 call    Page
  147.                 ld      hl, 0B500h
  148.                 ld      de, 1011h
  149.                 call    Page
  150.                 ld      hl, 9D00h
  151.                 ld      de, 1010h
  152.                 call    Page
  153.                 ld      a, 80h
  154.                 ld      i, a
  155.                 ld      h, a
  156.                 ld      l, 0
  157.                 inc     a
  158.  
  159. loc_82E3:
  160.                 ld      (hl), a
  161.                 inc     l
  162.                 jr      nz, loc_82E3
  163.                 inc     h
  164.                 ld      (hl), a
  165.                 ld      l, a
  166.                 ld      h, a
  167.                 ld      a, 0C3h
  168.                 ld      de, 82AEh
  169.                 ld      (hl), a
  170.                 inc     l
  171.                 ld      (hl), e
  172.                 inc     l
  173.                 ld      (hl), d
  174.                 di
  175.                 im      2
  176.                 ei
  177.                 ld      de, 8500h
  178.                 ld      (loc_829F+1), de
  179.                 ld      a, 40h
  180.                 exx
  181.                 ld      hl, 0C000h
  182.                 ld      de, 4010h
  183.                 ld      bc, 16
  184.                 call    sub_833B
  185.                 ld      (loc_82A2+1), de
  186.                 ld      a, 40h
  187.                 exx
  188.                 call    sub_833B
  189.                 ld      (loc_82A5+1), de
  190.                 ld      a, 40h
  191.                 exx
  192.                 call    sub_833B
  193.                 ex      de, hl
  194.                 ld      (loc_82A8+1), hl
  195.                 ld      b, 80h
  196.  
  197. loc_8329:
  198.                 ld      (hl), 0D5h
  199.                 inc     hl
  200.                 djnz    loc_8329
  201.                 ld      (loc_82AB+1), hl
  202.                 ld      b, 80h
  203.  
  204. loc_8333:
  205.                 ld      (hl), 0D5h
  206.                 inc     hl
  207.                 djnz    loc_8333
  208.                 jp      loc_8372
  209. ; End of function GenerateSubs
  210.  
  211.  
  212. ; --------------- S U B R O U T I N E ---------------------------------------
  213.  
  214.  
  215. sub_833B:
  216.                 ex      af, af'
  217.                 push    hl
  218.                 push    de
  219.                 ld      (loc_83C5+1), hl
  220.                 ld      (loc_83D2+1), de
  221.                 add     hl, bc
  222.                 ex      de, hl
  223.                 add     hl, bc
  224.                 ex      de, hl
  225.                 exx
  226.                 ld      hl, 83C5h
  227.                 ld      bc, 1Ah
  228.                 ldir
  229.                 exx
  230.                 ld      (loc_83C5+1), hl
  231.                 ld      (loc_83D2+1), de
  232.                 pop     de
  233.                 pop     hl
  234.                 exx
  235.                 ld      hl, 83C5h
  236.                 ld      bc, 1Ah
  237.                 ldir
  238.                 exx
  239.                 call    DownHL
  240.                 call    DownDE
  241.                 ex      af, af'
  242.                 dec     a
  243.                 jr      nz, sub_833B
  244.                 exx
  245.                 ex      de, hl
  246.  
  247. loc_8372:
  248.                 ld      (hl), 0DDh
  249.                 inc     hl
  250.                 ld      (hl), 0E9h
  251.                 inc     hl
  252.                 ex      de, hl
  253.                 ret
  254. ; End of function sub_833B
  255.  
  256.  
  257. ; --------------- S U B R O U T I N E ---------------------------------------
  258.  
  259.  
  260. DownHL:
  261.                 inc     h
  262.                 ld      a, h
  263.                 and     7
  264.                 ret     nz
  265.                 ld      a, l
  266.                 add     a, 20h
  267.                 ld      l, a
  268.                 ret     c
  269.                 ld      a, h
  270.                 sub     8
  271.                 ld      h, a
  272.                 ret
  273. ; End of function DownHL
  274.  
  275.  
  276. ; --------------- S U B R O U T I N E ---------------------------------------
  277.  
  278.  
  279. DownDE:
  280.                 inc     d
  281.                 ld      a, d
  282.                 and     7
  283.                 ret     nz
  284.                 ld      a, e
  285.                 add     a, 20h
  286.                 ld      e, a
  287.                 ret     c
  288.                 ld      a, d
  289.                 sub     8
  290.                 ld      d, a
  291.                 ret
  292. ; End of function DownDE
  293.  
  294.  
  295. ; --------------- S U B R O U T I N E ---------------------------------------
  296.  
  297.  
  298. PageOut:
  299.                 push    bc
  300.                 ld      bc, 7FFDh
  301.                 out     (c), a
  302.                 pop     bc
  303.                 ret
  304. ; End of function PageOut
  305.  
  306.  
  307. ; --------------- S U B R O U T I N E ---------------------------------------
  308.  
  309.  
  310. IncDE:
  311.                 ld      e, l
  312.                 ld      d, h
  313.                 inc     de
  314.                 ld      (hl), a
  315.                 ldir
  316.                 ret
  317. ; End of function IncDE
  318.  
  319.  
  320. ; --------------- S U B R O U T I N E ---------------------------------------
  321.  
  322.  
  323. Page:
  324.                 ld      bc, 17FFh
  325.                 add     hl, bc
  326.                 ld      bc, 7FFDh
  327.                 exx
  328.                 ld      bc, 1800h
  329.                 ld      de, 0D7FFh
  330.  
  331. loc_83B5:
  332.                 exx
  333.                 out     (c), d
  334.                 ld      a, (hl)
  335.                 dec     hl
  336.                 out     (c), e
  337.                 exx
  338.                 ld      (de), a
  339.                 dec     de
  340.                 dec     bc
  341.                 ld      a, b
  342.                 or      c
  343.                 jr      nz, loc_83B5
  344.                 ret
  345. ; End of function Page
  346.  
  347. ; ---------------------------------------------------------------------------
  348.  
  349. loc_83C5:
  350.                 ld      sp, 0
  351.                 pop     hl
  352.                 pop     de
  353.                 pop     bc
  354.                 pop     af
  355.                 exx
  356.                 ex      af, af'
  357.                 pop     hl
  358.                 pop     de
  359.                 pop     bc
  360.                 pop     af
  361.  
  362. loc_83D2:
  363.                 ld      sp, 0
  364.                 push    af
  365.                 push    bc
  366.                 push    de
  367.                 push    hl
  368.                 ex      af, af'
  369.                 exx
  370.                 push    af
  371.                 push    bc
  372.                 push    de
  373.                 push    hl
  374.  
  375.  
  376.                 savesna "3color.sna",start
  377.  
  378.                 ;savebin "3color.bin",$8200,image.end-$8200
  379.