flat assembler
Message board for the users of flat assembler.

Index > DOS > TETRIS 6 june 1984-2010

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
rCX



Joined: 29 Jul 2007
Posts: 166
Location: Maryland, USA
rCX
Really enjoyed it. Thanks edfed
Post 20 Jul 2010, 05:28
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
it looks i'm to download these sources soon and study dos as it works, thank you

http://www.freedos.org/freedos/files/
http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/fdfullws.iso
The same as fdfullcd, plus source code for all packages. This is a very large file. We mean it. No really, this is huge, and probably unnecessary except for the hard-core developer. If you want the source code for the "1.0" distribution, you're probably better off looking through the pkgs directory on ibiblio. You should not download fdfullws unless you are a developer who would like to view the source code.
Post 20 Jul 2010, 05:44
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
edemko, FreeDOS 1.0 was a few years ago. I'll admit that updates are fairly slow coming, but they do come in pieces. You might be better off without using their installer (which is fairly broken, esp. networking). Honestly, it's nice to have a complete .ISO, but if you only want to study pieces, grab those individually. (The kernel src is like < 500k ZIP'd, found here; try 2038 as later has some regressions.)
Post 21 Jul 2010, 03:58
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
rugxulo wrote:
Tested correctly here under Lucid PuppyLinux 5.01, DOSBox 0.74.


Imagine the horror of booting DOS Shocked

Quote:
Use the mouse to drag the window.


Heh ??? What mouse what window ??? I tested in DOS, and the thing doesn't support the mouse Sad About drug dealing, you know my opinion Smile

Quote:
July 4th version has source with copyright


COOL, silent update with source code (did not RTFS deeply nor tried to compile yet) Smile

New bugs (newly discovered):

- Trashes the mouse and the clock
- Can't screenshoot with SNARF, and no built-in screenshot feature

edemko wrote:
it looks i'm to download these sources soon and study dos as it works, thank you


Good, FreeDOS 1.0 is obsolete and buggy, get kernel 2038 (2039 has some nice improvements but at least 1 new critical BUG). FreeCOM regrettably hasn't been touched for years.

FreeDOS kernel in mostly C with some NASM.

FreeCOM is C.

Some utils are NASM (DELTREE, LBAcache, DEVLOAD, ...).

CTRAT is TASM/MASM/JAWASM.

A DOS kernel in ASM is DR-DOS / EDR-DOS (very historical MASM 3 syntax Laughing ) or RxDOS (MASM 6 (buggy) or NASM (unreleased) version).
Post 24 Jul 2010, 10:54
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
it is intended to work at least under win98 and dos. for boot, it is OK, but needs a mouse driver if you want to drag the tetris window. and click on nexyt piece and other buttons.

at least, i will soon trow a new update, with HQ sound (using PIT channel 2) Laughing
Post 24 Jul 2010, 12:15
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
edfed wrote:
it is intended to work at least under win98 and dos. for boot, it is OK


???

Quote:
but needs a mouse driver if you want to drag the tetris window. and click on nexyt piece and other buttons.


it doesn't work and "trashes" the mouse - FreeDOS EDIT 0.7 doesn't work anymore after your TETRIS

Quote:
at least, i will soon trow a new update, with HQ sound (using PIT channel 2)


COOL Smile Please add screenshot support (2 BUF's per 64 KiB, PrintScreen copies into buffer, save on exit if something of someone got shot before Laughing).
Post 24 Jul 2010, 13:06
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
normally, it just uses int33h, 3 to read coordinates.
then, i don't see why it will trashes the mouse....

for screen shot, i don't know at all how to make the support for a real mode application ,and for win dosbowx, the OS is responsible of it...

but it is a good exercice (for me) in order to build a generic game and os framework.. Smile

for screenshot, i can plan on the creation of a bitmap file on prtscr, incrementing the file number for a new shot...
but even that(screen shot) is a single project that will take a long time to do..
Post 24 Jul 2010, 13:18
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Hmmm, it works fine in DOSBox or XP's NTVDM, but on my older DOS 586 PC only if EMM386 is loaded (and needs a reboot afterwards, doesn't clean up properly, i.e. restore timer). This P4 PC here doesn't seem to want to let it work at all in FreeDOS under any circumstance (crash, MCB error), so I dunno.

DOS386, obviously I meant drag the "fake" internal window, not "Window"(tm). For the hundredth time, I get no extra joy out of emulated DOS, but sometimes it's all that works! :-/

EDIT: Oh, and it's right ctrl that pauses, not left. (Why?)
Post 24 Jul 2010, 22:44
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
edfed wrote:
but needs a mouse driver if you want to drag the tetris window. and click on nexyt piece and other buttons.


I can't find any buttons, but they are irrelevant anyway, the arrow is completely frozen, moving the mouse by several light years results in the arrow moved by exactly 0.0000 picoinches on the screen ....

Quote:
normally, it just uses int33h, 3 to read coordinates.
then, i don't see why it will trashes the mouse....


I do, see below

Quote:
for screen shot, i don't know at all how to make the support for a real mode application


... Brew a 320x200x8bpp BMP file with M$-PAINT or whatever (see attach), copy the header, put in the palette (1 KiB at position $0036) and the bitmap (64'000 Byte's at position $0436 from bottom to top). Save at game exit (rather than immediately after pushing hot key).

Quote:
for screenshot, i can plan on the creation of a bitmap file on prtscr, incrementing the file number for a new shot...


Smile

OK, I did RTFS:

{1}

Code:
vga13:
 push eax ecx esi edi
        mov ax,0a000h
       mov es,ax
   mov ah,090h
 mov fs,ax
   mov ah,20h
  mov gs,ax
   mov ecx,0ffffh/4
    xor eax,eax
@@:
      mov [es:ecx*4],eax
      mov [fs:ecx*4],eax
      mov [gs:ecx*4],eax
      dec ecx
     jnl @b
      mov al,13h
  int 10h
     pop esi edi ecx eax
 ret
    


What is this supposed to do ??? There is no point to clear VGA RAM at $000A'0000 BEFORE INT $10, but what's worse, you apparently have 2 buffers at hardcoded addresses $0009'0000 and $0002'0000 - given that it's a miracle that I could play this Tetris at all Sad You have to hog your buffers from DOS http://www.ctyme.com/intr/rb-2934.htm before writing any memory.

{2}

You apparently rise the PIT frequency to 1 KHz but fail to restore it before exit. Also, you should restore the PIT before any call to DOS, as the disk driver (BIOS or TSR) may rely on 18.2 Hz PIT.

{3}

You use the RDTSC instruction (really needed ???) so your Tetris will not work an anything below Pentium.

{4}

Heavy usage of 32-bit instructions in 16-bit code causes bloat and slowdown (also will not work on 8086).

{5}

Many calculations with constants.

{6}

Variables inside code - causes bloat, bad for PM programming

{7}

No comments (except title) at all - I do know who inspired you to this Smile

{8}

Faulty filenames: "fixeddecimal.inc" and some more

{9}

Source does compile but doesn't match the binary released separately

{10}

Many strange files:

- 2 "PIF-PAF" files (needed ???)
- "FAS" file
- empty files
- "Comsys.com" ??? (hangs)
- "tetris.com" (that's exactly what compilation brews, but doesn't match the binary released separately, it works, but is "different" ...)

{11}

Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;     tetris by edfed        ;
;    with fool and asm       ;
;    compile with fasm       ;
;   !!!for the 6june!!!      ;
;birthday of tetris and edfed;
;2/june/2010 start of project;
;3/june/2010  working version;
;4/june/2010 some ehancements;
;6/june/2010      version 0.1;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    


So you wrote it in just 1 day ??? After all, the God also brewed big things in just 1 day Laughing

{12}

MACRO's are included in a very "hidden" way

Rugxulo wrote:

> Hmmm, it works fine in DOSBox or XP's NTVDM

Unsurprisingly

> but on my older DOS 586 PC only if EMM386 is loaded
> (and needs a reboot afterwards

Unsurprisingly, see above

> doesn't clean up properly, i.e. restore timer).

Right, but not only.

> This P4 PC here doesn't seem to want to let it work at all in
> FreeDOS under any circumstance (crash, MCB error), so I dunno.

I do, see above.

> obviously I meant drag the "fake" internal window, not "Window"(tm)

Doesn't work, see above (I deprecate drug&drop as well as "windows", even if "internal" ...)

> For the hundredth time, I get no extra joy out of emulated DOS

No extra joy, just extra posts to advertise Neutral

> but sometimes it's all that works!

See above (+BTT-RR) why: so-called "DOS stuff" is NOT tested in DOS and fakes (like DOG-BOX, DOG-EMU, NTVDM, ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ...) forgive many CRITICAL BUG's (memory corruption (see above), invalid port usage (see other thread), usage of inexistent SoundBlaster, NTLFN, CMOVNTQ (indirectly), garbage I/O ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ...) so they indeed make "DOS stuff" crappy (it works for everybody except those who have DOS) Sad


Description: BMP : 65'078 Byte's of bloat
Download
Filename: BMP.ZIP
Filesize: 736 Bytes
Downloaded: 127 Time(s)


_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 25 Jul 2010, 05:55
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17664
Location: In your JS exploiting you and your system
revolution
edfed has some competition:

Image
Post 25 Jul 2010, 15:35
View user's profile Send private message Visit poster's website Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
Post 26 Aug 2010, 12:14
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
edfed is dead Sad

> http://code.google.com/p/tetris-asm/downloads/detail?name=tetris.zip

COOL, but is it FASM ???

> Uploaded by: k.netpost
> Uploaded: May 03, 2010
> Downloads: 18
> Type-Executable
> OpSys-Windows

Sad

Image
Image

One more: http://board.flatassembler.net/topic.php?t=11892
Post 07 Sep 2010, 23:25
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
no, i'm not dead, just paused, because summer is not finished.
and no tetris update because i meet a problem with XP compatible version, it compiles, but it don't run at all...
Post 09 Sep 2010, 10:10
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
DOS386 wrote:

> http://code.google.com/p/tetris-asm/downloads/detail?name=tetris.zip

COOL, but is it FASM ???

> Uploaded by: k.netpost
> Uploaded: May 03, 2010
> Downloads: 18
> Type-Executable
> OpSys-Windows

Sad


DOS .COM, apparently TASM, but it wouldn't be hard to translate to FASM. Plays okay, but it just seems to restart upon game over without warning (which almost made me think I'd advanced a level, but there are none!).
Post 09 Sep 2010, 20:21
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.