Jump to content

tebe

Members
  • Posts

    1,225
  • Joined

  • Last visited

Everything posted by tebe

  1. But "Time Wizard" is a more original idea than porting a game from another platform. Yes, competition was high.
  2. jon red dick, interesting name for a bot
  3. unit GRAPH update: DrawPoly, FillPoly procedure DrawPoly(amount: byte; var vertices); (* @description: Draw polygon *) var i: byte; P, Q: PWord; begin P:=@vertices; Q:=@vertices; for i:=0 to amount-2 do begin Line(P[0], P[1], P[2], P[3]); inc(P, 2); end; Line(Q[0], Q[1], P[0], P[1]); end; procedure FillPoly(amount: byte; var vertices); (* @description: Fill polygon Adapted from http://alienryderflex.com/polygon_fill/ https://github.com/tuupola/hagl/blob/master/src/hagl_polygon.c *) var i, j, y, miny, maxy, count: byte; P, Q: PWord; x0,y0,x1,y1, swap: word; nodes: array [0..63] of word; begin miny := 255; maxy := 0; P:=@vertices; for i := 0 to amount-1 do begin if (miny > P[1]) then miny := P[1]; if (maxy < P[1]) then maxy := P[1]; inc(P, 2); end; // Loop through the rows of the image. for y := miny to maxy-1 do begin // Build a list of nodes. count := 0; j := amount - 1; P:=@vertices; Q:=@vertices + j shl 2; for i := 0 to amount-1 do begin x0 := P[0]; y0 := P[1]; x1 := Q[0]; y1 := Q[1]; if ( ((y0 < y) and (y1 >= y)) or ((y1 < y) and (y0 >= y)) ) then begin nodes[count] := trunc(x0 + (y - y0) / (y1 - y0) * (x1 - x0)); inc(count); end; Q:=P; inc(P, 2); end; // Sort the nodes, via a simple 'Bubble' sort. i := 0; while (i < count - 1) do begin if (nodes[i] > nodes[i + 1]) then begin swap := nodes[i]; nodes[i] := nodes[i + 1]; nodes[i + 1] := swap; if i<>0 then dec(i); end else inc(i); end; // Draw lines between nodes. i:=0; while i < count do begin Hline(nodes[i], nodes[i + 1], y); inc(i, 2); end; end; end; polygon.obx polygon.pas
  4. Z80 to Motorola 68000 https://github.com/jotd666/amiga68ktools/blob/master/tools/z80268k.py This is a 1:1 arcade port of the game FROGGER by KONAMI from 1981 for the Amiga 500. The game is written in 68k assembler, based on the original Z80 code. https://rmjoejoe.itch.io/frogger500 p.s. https://www.msx.org/forum/msx-talk/development/z80-6502-recompiler-atariage-forum-seems-inspiring-for-porting-msx-stuff-
  5. try with this (Hannibal takes selfie at war with his friends ancient roman centurion warrior)
  6. procedure unZX0(fnam: PString; outputPointer: pointer; a: byte); register; overload; this was probably supposed to be a temporary procedure until I corrected it, but I forgot it has now been fixed https://github.com/tebe6502/Mad-Pascal procedure unZX0(fnam: PString; outputPointer: pointer); register; overload; https://github.com/tebe6502/Mad-Pascal/blob/master/lib/zx0.pas
  7. lda lab1: #0 sta lab2: $ffff,y lda lab3: ($80),y .local temp ; local : lda lab: $a000,x .endl .local temp ; global :: lda lab:: $a000,x .endl
  8. Without this additional parameter, it will not be possible to distinguish between the calls of these two variants of the UNZX0 procedure procedure unZX0(inputPointer, outputPointer: pointer); assembler; register; overload; procedure unZX0(fnam: PString; outputPointer: pointer); register; overload; Error: Can't determine which overloaded function 'UNZX0' to call
  9. https://github.com/tebe6502/Mad-Pascal/tree/master/samples/a8/compression https://github.com/tebe6502/Mad-Pascal/blob/master/lib/zx0.pas interface procedure unZX0(inputPointer, outputPointer: pointer); assembler; register; overload; procedure unZX0(fnam: PString; outputPointer: pointer; a: byte); register; overload;
  10. MP 1.6.9 https://github.com/tebe6502/Mad-Pascal/releases - improved memory allocation for arrays [0..0], 'ABSOLUTE $0000' is enforced initially, 1 byte of memory is saved - added possibility to declare arrays without specifying their size, e.g.: var tab: array of byte = [1,3,4,3,1]; var tb: array of char = 'abcdefghij'; - new compiler directive {$bin2csv filename} allows you to initialize arrays e.g.: var tb: array of byte = [ {$bin2csv filename} ]; - new compiler directive {$optimization loopunroll}, {$optimization noloopunroll}, performs FOR loop unrolling with fixed parameters - new BLOWFISH module allowing to encrypt, decrypt character strings according to specified key - new example a8\AES-Rijndeal new samples (AES-Rijndeal, Blowfish) https://github.com/tebe6502/Mad-Pascal/tree/master/samples/a8/math/AES-Rijndael https://github.com/tebe6502/Mad-Pascal/blob/master/lib/blowfish.pas https://github.com/tebe6502/Mad-Pascal/tree/master/samples/common/math/blowfish blowfish_test.obx
  11. yes 3 modes on screen (mod player), 40 columns, 80 columns, vga (each in a separate pallet)
  12. method with XOR is the fastest, takes the least memory resources (Pang intro) https://github.com/tebe6502/Pang/tree/main/title_2 logo_main.xex
  13. https://github.com/tebe6502/Mad-Pascal new directive {$optimization LOOPUNROLL}, {$optimization NOLOOPUNROLL}, works only with FOR with const parameters {$optimization LOOPUNROLL} for a:='a' to 'd' do writeln(a); {$optimization NOLOOPUNROLL}
  14. https://github.com/tebe6502/Mad-Assembler/blob/master/examples/LIBRARIES/fp/example.asm
  15. I have such an effect in the "drawer" that uses CHACT (Video Reflect) and switching sets every line, there was no such effect on XE/XL yet
  16. 30, if you want to get rid of "bad lines" 240 they can be switched every line you can also change the set in the middle of the line split_charset_2.asm split_charset_2.obx
  17. everyone uses VSCode, you will too just don't know it yet
  18. https://github.com/tebe6502/Mad-Pascal/tree/master/samples/a8/sound/sfx xSFX (Mad Pascal)
  19. also does not emulate the Atari 2600 and Atari Jaguar
×
×
  • Create New...