Sunday, 21 April 2019

Crack CD Protection


Crack CD Protection


Lemme share how to finish the RiPPing by cracking
the protection. This will help you w/ the most basic system of protection,
called C- dilla, that is the most usual one…

The programs we will use are 2: first, and decompiler – the files we will
work with are in ExE format, and we need a program that will HeX them (transfer
to 16 base, hexa, form) and locate the orders given in the code, then we will
find the line we need and change it to remove the protection with... – the
second program: we need a program that will *edit* the files, and fetch the
right line number we got using the first program… all those action are easly
done w/ the programs: Win32Dasm (the disassembler - decompiler program, added in
the dir [root/Win32Dasm]), and Hiew (the editing program added in the dir
[root/Hiew]). The programs are added to the tutorial, because I’m not so sure
you can find then on a stable location on the net, in the dir [root/programs].
Chapter II: The easy protection.


Okay! To save you from reading this entire tutorial for nothing you’re not going
to use I made this chapter, because there is a good chance you won’t be needing
it! Some games comes w/ protection as a files in the [/Setup] dir (or root
dir) called: [00000001.TMP], [CLCD16.DLL], [CLCD32.DLL] and most important
[CLOKSPL.EXE]... if you see any of them delete it and the protection should
disappear (Important! delete them after making a mirror of the game on your HD,
using the info in the next chapter) … if you are still getting an error message
just keep on reading.

Chapter III: Finding the right file – and the right error.

The files we are going to work w/ will be the main ExE of the game: you will
find it on the CD, in a dir called [/Setup] or [/data], but the easy way to find
it is just installing the game, and the ExE that starts the game – will be the
ExE we need! ... once you’ve got it make some room on your HD, because we are
going to copy the hole CD to it… before you do that: some games have am option,
when Installing, to Install the full game to the CD (but still needing it to
play), use it if possible, The files you need to copy are all the game files,
in some games it is the root dir of the CD, in others it is the [root/data] dir…
the worst case is when the game is inside a CAB file, then you have to use a CAB
extractor (WinZip 8 should do the job), and if it is protected a different
program that can compile CAB format (I’ll try to put it on the tutorial as
well). Once you’ve done all that – press the ExE, and if the game opens close it
and exit the CD, then press again- you will get an error window! … usually the
line goes like: “Error, please enter CD to run game” or “CD error” or “Error
reading CD-ROM” .. what ever error you get – write it down and remember it, we
are about to look for it in the ExE code, and change it!
Chapter IV: Finding the right line number.

Open the first program - Win32Dasm, by unzipping it and clicking on
[/w32dsm89.exe], now we have to load the file we know is the main ExE of the
game, so click on “Disassembler“ in the main menu, then “Open File to
Disassemble...” (Important! Make sure you got 50-100MB free on your HD) before
then pick the file from the clone game dir you made in your HD (Important! make
a backup of the ExE) … after you’ve success fully w8ed while the program
disassembled the file, you will see *a lot * of gibberish… don’t worry! You
don’t have to understand what is says (I don’t, and I’m not so sure ne1 does…
except the programs of course) … (Important! If you can’t read and the font
shows only numbers and bizarre letters, click on “Disassembler” in main menu,
then “Font…” then “select Font” then pick Arial or something in English) … now
you have to find the exact line number out of the 2 million in the file that has
the error message in it, do that by clicking the “String Data references”
button, from the buttons menu (under the main menu) – the second one from the
right (-your right)… now you get a list of all the lines in the ExE that refers
to actions, and you have narrowed the lines from 2 million – to 2 thousand… to
find the error message click the first letter it started w/ (for example, if the
message was “Error reading CD-ROM” click E) then search ‘till you find the
error line you are looking for! … once you’ve found it… it will mark the title,
pick the first line, and it should change color to green (that means the line
can be edited and is important)… to be sure you have taken the right line:

if
there is a line like:
“:0044XBCK EB08 ….. (lots of spaces) …. Jmp 0044EBD8” or:
“:0044XBCK EB08 ….. (lots of spaces) …. Call 0044EBD8” or:
“:0044XBCK EB08 ….. (lots of spaces) …. Push 0044EBD8”


you at the right line, it says the command is a function, effected by the user,
and probably the protection we are looking for (notice the words: Jmp = Jamp,
Call = Call, Push = Push)… now that we got the right line we have to find her
number! That is done by looking at the bottom of the program window and in the
line, that should look similar to this one:

“Line:*** Pg *** of *** Code Data @:0045821 @Offset 00045821h in file:***.exe“
notic the number that comes after the word „Offet“ in this line: 00045821h that
is the line number! But notice the letter „h“ at the end of it – you don’t need
it, and don’t forget to remove it from the number, now – the only thing left to
do is changing the line and removing the protection!
Chapter V: Editing the line.

After writing down the line number you can minimize Win32Dasm, because for now
we have finished using it. Open the second program: Hiew (added in the
tutorial), this is an editor that will work bad for searching the right line,
but will do if you know the line number and just wanna change it…
Open again the same game ExE you have processed in Win32Dasm. When you enter you

see a lot of gibberish, that’s the code, and you need to change it to the
decoded language… do that by pressing the F4 key and then pick the option
“Decode“ .. heh! Alot better now... now click F5 key, to search the right line,
you will see the line numbers at the left end of the screen is gray, enter the
line number you got from Win32Dasm and it will jump you to the right loction in
the file... now, this is the difficult part, not hard to do – but hard to
explain, near the line number (just at the right) you will see the command in
HeX form, it should be something like BC1BB3D2D1 that is in HeX code (base 16)
which means a number (=byte) is represented by 2 letters/number, so that the
group (BC1BB3D2D1) is made of 5 bytes: BC – 1B – B3 – D2 – D1 ... (10 numbers =
5 bytes, 8 numbers = 4 bytes and so on...), we are about to change evrey byte
from D1 or BC to 90 this is done by pressing the key F3 (activates Editing
option) and pressing, for every byte, the number 90 (90 is the noop number, that
will disable the action)... and in our case, the command will change from
BC1BB3D2D1 to 9090909090 ... once it is done click the key F10 to save the
offset, and exit.

Chapter VI: Testing.


Now that you have an ExE w/out the error line, activate it from the same clone
dir of the game you made to test it, if its working – congratulation! You have
just cracked a CD protection! … if you are getting another error message redo
the same steps you have do w/ the first error message (in chapters 3-5) to
change it as well (Important! Do it on the same ExE you have edited, and backup
this one as well) and then test it again. You might be needed to do it several
number of times, until you are getting no error message and the game runs!


Chapter VII: Quick order list.

- Start without Cd then look at the error message and write it down.
- Search the msg in Win32Dasm referance and copy nmber w/out the H at the end!.
- Open Hiew, F4 to Decode, F5 to seach the line, and change the command – 90 for

every 1 byte.
- F10 to save and then get out, don’t forget to test!



Clear CMOS all Tricks



Clear CMOS all Tricks

ENTERING DEBUG

Debug has been included in every version of MS-DOS as well as Windows. When running any of the debug routines it is recommended that if you have Windows that you exit or shut down to get into a real DOS prompt (unless you're running Windows ME, Windows 2000, Windows XP, or later versions).




Once at the MS- DOS prompt, run through the below example, this example is perfectly fine to run on any PC Computer running MS-DOS / Windows and will not harm anything.
Type debug and press enter.
This should get you to a - (small dash). This is the debug prompt.
At the - type d40:00 and press enter; this will return several lines of information.
After the feedback you will be back to the debug prompt.
To exit out of debug type q and press enter. This will return you back to the MS-DOS prompt.


In some of the below debug routines you will notice that a "g" is typed, then "q". G tells the computer that the code type is not self executing and must be run at this point. If completed, the program will return Program Terminated Normally which indicates you can now quit from the debug program.
TESTING PORTS
The below debug routine will check the ports of the computer to allow you to know if ports are being detected or not. Type debug to get to the "-" Type D40:0
You should get several lines; however, the first line is the only important line, which should read the following:
0040:0000 F8 03 F8 02 E8 03 E8 02 - 78 03 78 02 BC 03
F8 03
F8 02
E8 03
E8 02

78 03
78 02
BC 03
COM1
COM2
COM3
COM4

LPT1
LPT2
LPT3

The above graph shows you what the feed back means as far as port, so if you see F8 03, this would be an indication that COM1 is being detected; if you see 00 00, this is an indication that it is not being detected, which could mean that hardware is bad or that it is disabled inCMOS
Once you have finished looking at the information, type Q and press enter to get out of Debug.

CLEAR CMOS
The below debug routine will clear CMOS, BIOS, Passwords, Settings, Viruses, and other items residing in the CMOS. During this process you may get returned characters which are an indication that the string has gone in, if you by chance get ERROR ensure that you have typed the line in correctly, if not retype. Ensure that you do not skip any lines, that it is ALL typed in correctly to help prevent problems. Before running this Debug routine also ensure that you have read the above disclaimer. After typing debug you will get "-" which is were you can begin by typing A and pressing enter. A <ENTER>
MOV AX,0 <ENTER>
MOV AX,CX <ENTER>
OUT 70,AL <ENTER>
MOV AX,0 <ENTER>
OUT 71,AL <ENTER>
INC CX <ENTER>
CMP CX,100 <ENTER>
JB 103 <ENTER>
INT 20 <ENTER>
<ENTER> Note: Nothing is typed on this line
G <ENTER> By pressing G this will execute the above script, ensure you have read and agree to the above disclaimer.
Q <ENTER>
Then reboot and you will get a Setup Checksum Error. Go into setup, correct all the incorrect values, time, date...

JOYSTICK TEST
This test will test to see if your Joystick is present or not. Type debug from the DOS prompt once at the "-". Type i201 If you get a FF response attempt hold one of the main buttons on your joystick, and while holding the button down type i201 and see if a different response is given, each button on the joystick should return a different response. However, some special joysticks, such as the Microsoft Sidewinder, which has more than 4-5 buttons, may not return a response for all extra buttons because these buttons are generally controlled through software. If a FF is still given on each of the buttons on the game paddle or joystick, it is a good possibility that either the Joystick and or the Joystick port is bad. If possible, attempt these steps with another known working joystick. However, if you are receiving different responses when pressing and holding the keys on the joystick, the computer hardware is working properly. Type q and press enter to quit out of debug.

ERASING SECTOR 2

Before doing the below routine ensure that you have read our disclaimer and that you're sure that this is safe to do on your hard drive. Some computer hard drive manufacturers may void your warranty if this routine is ran or in some situations this can cause damage to the hard drive. This routine is useful in clearing DDO and unknown partitions. If this routine completes successfully it will erase everything in Sector 2. In the below debug routine, only type what is in bold from line 3 to 9, you will get a response if typed in properly. If you get a response continue to type the bold text as shown below in the below example.
A:\>debug
-FCS:200 400 0<enter>
-ACS:100<enter>
-xxxx:0100 mov ax,302<enter>
-xxxx:0103 mov bx,200<enter>
-xxxx:0106 mov cx,2<enter>
-xxxx:0109 mov dx, 80<enter>
-xxxx:010a int 13<enter>
-xxxx:010c int 20<enter>
-xxxx:0110 <enter>(without typing anything)
-g <enter>
Program terminated normally.
-q <enter>

ERASE ALL HDD INFORMATION
This debug routine is used to erase all partition information on the hard disk drive and is only recommend for experienced users or users who are unable to delete the partition information through fdisk. In the below debug routine, only type what is in bold from line 3 to 8, you will get a response if typed in properly. If you get a response continue to type the bold text as shown below in the below example. A:\>debug <enter>
-F 200 L1000 0 <enter>
-A CS:100 <enter>
xxxx:0100 MOV AX,301 <enter>
xxxx:0103 MOV BX,200 <enter>
xxxx:0106 MOV CX,1 <enter>
xxxx:0109 MOV DX,80 <enter> (80 for hd 0 or 81 for hd 1 ) xxxx:010C INT 13 <enter>
xxxx:010E INT 20 <enter>
xxxx:0110 <enter>
-g <enter>
Program terminated normally
-q<enter>
Once this debug routine is complete, reboot computer and all partitions should be erased. Before anything can be installed back onto the computer you must run Fdisk and recreate the partition as well as format the hard disk drive.

ERASE HDD AND CLEAR CMOS

Before doing the below routine ensure that you read our disclaimer as well as are sure that this is safe to do on your hard drive. Some computer hard drive manufacturers may void your warranty or this may cause damage to the hard drive when doing the below example. This routine is useful in clearing DDO and removing possible viruses. If this routine completes successfully it will erase everything from your Hard Drive as well as your reset your CMOS values. In the below debug routine, only type what is in bold from line 3 to 17, you will get a response if typed in properly. If you get a response continue to type the bold text as shown below in the below example.
A:\>debug <enter>
-fcs:200 400 0 <enter>
-acs:100 <enter>
-xxxx:0100 mov ax, 0 <enter>
-xxxx:0103 mov ax, cx <enter>
-xxxx:0105 out 70, al <enter>
-xxxx:0107 mov ax, 0 <enter>
-xxxx:010a out 71,al <enter>
-xxxx:010c inc cx <enter>
-xxxx:010d cmp cx,100 <enter>
-xxxx:0111 jb 103 <enter>
-xxxx:0113 mov ax,302 <enter>
-xxxx:0116 mov bx,200 <enter>
-xxxx:0119 mov cx,1 <enter>
-xxxx:011c mov dx,80 <enter>
-xxxx:011f int 13 <enter>
-xxxx:012l int 20 <enter>
-xxxx:0123 <enter> (without typing anything.)
-g <enter> program terminated normally
If you are doing this debug routine to clear out a possible virus turn off your computer and wait and turn back on.
-q <enter>
Once back at DOS, reboot your computer
When your computer comes back on from doing the above you will get an error message as booting up the computer, such as "Invalid Configuration". You must enter CMOS and set the time and date, save, and reboot again. Once rebooted, you will then need to run fdisk and recreate the partitions. Once created, you will then need to format the hard drive and proceed as normal.

DISCHARGE OLD LAPTOP BATTERIES
The below debug routine is used for older laptop batteries (i.e. batteries made from 1990-1992), we do not recommend using this routine on any newer laptop batteries or any NiMH batteries N DPDISCHG.COM <Enter>
A <Enter>
MOV DX,01E8 <Enter>
MOV AL,F9 <Enter>
OUT DX,AL <Enter>
INT 20 <Enter>
<Enter>
RCX <Enter>
10 <Enter>
W <Enter>
Q <Enter>
This will write dpdischg.com to the current directory. To run this utility type dpdischg.

REBOOT YOUR COMPUTER
Implement this debug routine to reboot your computer. DEBUG E 40:72 34 12
RCS
FFFF
RIP
0000
G
To create a batch file that reboots your computer without having to type the above command each time, use the below example. GOTO BEGIN

E 40:72 34 12
RCS
FFFF
RIP
0000
G

:BEGIN
DEBUG < REBOOT.BAT

CREATE A SLEEP FILE
This file allows your computer to sleep for a specified amount of time. This file is not dangerous in any way; if typed improperly, more than likely the file will just not work. Type Debug You should get a "-" begin typing the below information; after each line you may get a response, do not press enter and type the next line after the response. N SLEEP.COM
A 100
MOV SI,0082
MOV AX,[SI]
XCHG AH,AL
XOR AX,3030
MOV BL,AL
MOV AL,0A
MUL AH
ADD AX,BX
MOV SI,AX
MOV AH,2C
INT 21
MOV BL,DH
MOV AX,SI
AAM
OR AX,3030
XCHG AH,AL
MOV [0160],AX
MOV AH,09
MOV DX,0160
INT 21
MOV AH,06
MOV DL,FF
INT 21
JZ 014C
OR AL,AL
JNZ 013F
MOV AH,08
INT 21
MOV AL,FF
MOV DX,016C
PUSH AX
MOV AH,09
INT 21
POP AX
MOV AH,4C
INT 21
MOV AH,2C
INT 21
CMP BL,DH
JZ 012D
MOV BL,DH
DEC SI
JNZ 011A
SUB AL,AL
MOV DX,016C
JMP 0142
DB "XX SECONDS", D, 24
DB " ", D, A, 24
RCX
79
W
Q
Tip: You may cut and paste the above test into a notepad document and save the file with a .scr extension. Once saved from DOS, type debug < name of scrSLEEP.COM. which should create the file; should be created

CHECK BIOS DATE
The below debug routine is to check the date of your BIOS. All BIOS dates on PC compatible computers is stored at memory address FFFF5h. To display the date of your BIOS do the following: At the C:\> type debug - d FFFF:5 L 8 After typing the above command you should receive a string similar to: FFFF:0000 30 34 2F-33 30 2F 39 38 4/30/98 The 4/30/98 would be the date of your computer BIOS.

VIDEO CARD TYPE

The below debug routine will list the type of video card within your computer. This is an excellent way of determining the chipset on the card or the card within your computer without opening the computer. At the C:\> type debug -d c000:0040 After typing the above command you should receive several lines of text similar to:
C000:0040


00
00
00
00
00
00
00
00
-
00
00
00
00
00
00
00
00

................
C000:0050

E9
63
7B
00
B4
10
49
27
-
E9
FE
2B
E9
F7
2B
50
4D

.c{...I'..+..+PM
C000:0060

49
44
58
00
5B
00
00
00
-
00
A0
00
B0
00
B8
00
C0


IDX.[...........
C000:0070

00
5B
53
54
42
20
6E
56
-
49
44
49
41
20
54
4E
54

.[STB nVIDIA TNT
C000:0080

20
76
65
72
2E
20
31
2E
-
31
30
20
0D
0A
00
1B
43

ver. 1.10 ....C
C000:0090

6F
70
79
72
69
67
68
74
-
28
43
29
31
39
39
38
20

opyright(C)1998
C000:00A0

53
54
42
20
53
79
73
74
-
65
6D
73
20
49
6E
63
0D

STB Systems Inc.
C000:00B0

0A
00
22
6C
2C
0A
01
00
-
C3
50
24
7F
E8
60
36
58

.."1,....P$..'6X
As you can pick out in the above dump, this gives you enough information to determine the make and the year made on the video card. On line 4 you can see the make of this video card, which in this case is a N VIDIA TNT which would be the Riva TNT chipset. The next line you notice the version of the card and finally the line thereafter is the copyright or the year manufactured, generally. If you are unable to capture any information which sounds like the video card, you can also type -d c000:0090



NOKIA Universal Codes

.:: NOKIA ::.Universal Codes

Code Description :
These Nokia codes will work on most Nokia Mobile Phones
(1) *3370# Activate Enhanced Full Rate Codec (EFR) - Your phone uses the best sound quality but talk time is reduced my approx. 5%
(2) #3370# Deactivate Enhanced Full Rate Codec (EFR) OR *3370# ( Favourite )
(3) *#4720# Activate Half Rate Codec - Your phone uses a lower quality sound but you should gain approx 30% more Talk Time.
(4) *#4720# Deactivate Half Rate Codec.
5)  *#0000# Displays your phones software version, 1st Line : Software Version, 2nd Line : Software Release Date, 3rd Line : Compression Type. ( Favourite )
(6) *#9999# Phones software version if *#0000# does not work.
(7) *#06# For checking the International Mobile Equipment Identity (IMEI Number). ( Favourite )
(8) #pw+1234567890+ 1# Provider Lock Status. (use the "*" button to obtain the "p,w" and "+" symbols).
(9) #pw+1234567890+ 2# Network Lock Status. (use the "*" button to obtain the "p,w" and "+" symbols).
(10) #pw+1234567890+ 3# Country Lock Status. (use the "*" button to obtain the "p,w" and "+" symbols).
(11) #pw+1234567890+ 4# SIM Card Lock Status. (use the "*" button to obtain the "p,w" and "+" symbols).
(12) *#147# (vodafone) this lets you know who called you last.
(13) *#1471# Last call (Only vodofone).
(14) *#21# Allows you to check the number that "All Calls" are diverted to
(15) *#2640# Displays security code in use.
(16) *#30# Lets you see the private number.


(17) *#43# Allows you to check the "Call Waiting" status of your phone.
(18) *#61# Allows you to check the number that "On No Reply" calls are diverted to.
(19) *#62# Allows you to check the number that "Divert If Unreachable (no service)" calls are diverted to.
(20) *#67# Allows you to check the number that "On Busy Calls" are diverted to.
(21) *#67705646# Removes operator logo on 3310 & 3330.
(22) *#73# Reset phone timers and game scores.
(23) *#746025625# Displays the SIM Clock status, if your phone supports this power saving feature "SIM Clock Stop Allowed", it means you will get the best standby time possible.
24) *#7760# Manufactures code.
(25) *#7780# Restore factory settings.
26) *#8110# Software version for the nokia 8110.
(27) *#92702689# Displays - 1.Serial Number, 2.Date Made, 3.Purchase Date, 4.Date of last repair
(0000 for no repairs), 5.Transfer User Data. To exit this mode you need to switch your phone off then on again. (Favourite )
(28) *#94870345123456789 # Deactivate the PWM-Mem.
(29) **21*number# Turn on "All Calls" diverting to the phone number entered.
(30) **61*number# Turn on "No Reply" diverting to the phone number entered.
(31) **67*number# Turn on "On Busy" diverting to the phone number entered.
(32) 12345 This is the default security code.

press and hold # Lets you switch between lines
IMEI number: * # 0 6 #
Software version: * # 0 0 0 0 #

Simlock info: * # 9 2 7 0 2 6 8 9 #
Enhanced Full Rate: * 3 3 7 0 # [ # 3 3 7 0 # off]
Half Rate: * 4 7 2 0 #
Provider lock status: #pw+1234567890+ 1
Network lock status #pw+1234567890+ 2
Provider lock status: #pw+1234567890+ 3
SimCard lock status: #pw+1234567890+ 4
NOKIA 6110/6120/6130/ 6150/6190
NOKIA 3110
IMEI number: * # 0 6 #
Software version: * # 0 0 0 0 # or * # 9 9 9 9 # or * # 3 1 1 0 #
Simlock info: * # 9 2 7 0 2 6 8 9 #
NOKIA 3330
*#06# This will show your warranty details *#92702689#
*3370# Basically increases the quality of calling sound, but decreases battery length.
#3370# Deactivates the above
*#0000# Shows your software version
*#746025625# This shows if your phone will allow sim clock stoppage
*4370# Half Rate Codec activation. It will automatically restart
#4370# Half Rate Codec deactivation. It will automatically restart
Restore Factory Settings To do this simply use this code
*#7780# Manufacturer Info Date of Manufacturing *#3283#
*3001#12345# (TDMA phones only) This will put your phone into programming mode, and you'll be
presented with the programming menu.
2) Select "NAM1"
3) Select "PSID/RSID"
4) Select "P/RSID 1"
Note: Any of the P/RSIDs will work
5) Select "System Type" and set it to Private
6) Select "PSID/RSID" and set it to 1
7) Select "Connected System ID"
Note: Enter your System ID for Cantel, which is 16401 or 16423. If you don't know yours, ask your local dealer for it.
8) Select "Alpha Tag"
9) Enter a new tag, then press OK

10) Select "Operator Code (SOC)" and set it to 2050
11) Select "Country Code" and set it to 302 for Canada, and 310 for the US.
12) Power down the phone and power it back on again ISDN Code To check the ISDN number on your Nokia use this code *#92772689#. ::


secret tricks for LG mobile or cellphone

On the main screen type *#06#

Information you get from the IMEI (International Mobile Equipment Identity)
XXXXXX XX XXXXXX X
TAC FAC SNR SP


TAC = Type approval code of your LG Mobile
FAC = Final assembly code of your cellphone
SNR = Serial number of your LG Phone
SP = Spare

Other secret tricks for LG mobile or cellphone


LG all models test mode:
Type 2945#*# on the main screen.
2945*#01*# Secret menu for LG
IMEI and SW (LG 510): *#07#
Software version (LG B1200): *8375#
Recount cheksum (LG B1200): *6861#
Factory test (B1200): #PWR 668
Simlock menu (LG B1200): 1945#*5101#
Simlock menu (LG 510W, 5200): 2945#*5101#
Simlock menu (LG 7020, 7010): 2945#*70001#
Simlock menu (LG 500, 600): 2947#*

LG-U81XX SPECIAL CODES
Code to read phone version :
- Phone without SIM
- Enter 277634#*# or 47328545454#
- Select 'SW Ver.info'
Code to reset phone :
- Phone without SIM

- Enter 277634#*# or 47328545454#
- Select 'Factory Reset'

Code to enter UNLOCK MENU :
- Phone wit SIM inside
- Enter 2945#*88110#
Test Menu 8330 : 637664#*#
Test Menu 8180 V10a: 49857465454#
Test Menu 8180 V11a: 492662464663#
Test Menu 8130-8138: 47328545454#
Test Menu 8110-8120: 277634#*


THANKS FOR VISITING THE SITE COMING SOON WITH NEW TRICKS AND SEE YOU SOON(SHUBHAM SINGH) YOUR FRIEND



Make a free website at Freewebs.com



Logical and Physical HTML

No introduction to HTML would be complete without a discussion of the logical versus physical markup battle at the heart of HTML. Physical HTML refers to using HTML to make pages look a particular way; logical HTML refers to using HTML to specify the structure of a document, and using another technology, such as cascading style sheets (see Chapter 10), to designate the look of the page. Mostpeoplearealreadyveryfamiliarwithphysicaldocumentdesign,becausethey normallyuseWYSIWYG(whatyouseeiswhatyouget)texteditors,suchasMicrosoftWord. WhenWorduserswanttomakesomethingbold,theysimplyselecttheappropriate button,andthetextismadebold.InHTML,youcanmakesomethingboldsimplyby enclosingitwithinthe
<B>and</B>tags,

asshownhere:
<B>This is important.</B>
This can easily lead people to believe that HTML is nothing more than a simple formatting language. WYSIWYG HTML editors (such as Microsoft FrontPage) also reinforce this view; but as page designers try to use HTML in this simplistic fashion, sooner or later they must face the fact that HTML is not a physical page-description language. Page authors can’t seem to make the pages look exactly the way they want; and when they can, doing so often requires heavy use of <TABLE> tags, giant images, and even trick HTML. Other technologies, such as style sheets, may provide a better solution for formatting text than a slew of inconsistently supported tricks and proprietary HTML elements.




According to many experts, HTML was not designed to provide most of the document layout features people have come to expect, and it shouldn’t be used for that purpose.Instead,HTMLshouldbeusedasalogical,orgeneralized,markuplanguage thatdefinesadocument’sstructure,notitsappearance.Forexample,insteadofdefining theintroductionofadocumentwithaparticularmargin,font,andsize,HTMLjustlabels itasanintroductionsectionandletsanothersystem,suchasCascadingStyleSheets, determinetheappropriatepresentation.InthecaseofHTML,thebrowserorastyle sheethasthefinalsayonhowadocumentlooks. HTML already contains many logical elements. An example of a logical element is <STRONG>, which indicates something of importance, as shown here:
<STRONG>This is important.</STRONG>
The <STRONG> element says nothing about how the phrase “This is important” will actually appear, although it will probably be rendered in bold. While most of the logical elements are relatively underutilized, others, such as headings (<H1> through <H6>) and paragraphs, are used regularly. The benefits of logical elements may not be obvious to those comfortable with physical markup. To understand the benefits, it’s important to realize that on the Web, many browsers render things differently. In addition, predicting what the viewing environment will be is difficult. What browser does the user have? What is his or her monitor’s screen resolution? Does the user even have a screen? Considering the extremeoftheuserhavingnoscreenatall,howwouldaspeakingbrowserrenderthe <BOLD>element?Whataboutthe <STRONG>element?Texttaggedwith <STRONG> might be read in a firm voice, but boldfaced text doesn’t have a meaning outside the visual realm. Many realistic examples exist of the power of logical elements. Consider the multinational or multilingual aspects of the Web. In some countries, the date is written with the day first, followed by the month and year. In the United States, the date generally is written with the month first, and then the day and year. A <DATE> element, if it existed, could tag the information and let the browser localize it for the appropriate viewing environment. Another example is the problem of screen sizes that, theoretically, could be reduced by logical structuring concepts. For example, logical elements could allow for different renderings based on the screen size of the computer running the browser. This would allow the creation of documents that look good on laptop screens as well as on large workstation monitors. In short, separation of the logical structure from the physical presentation allows multiple physical displays to be applied to the same content. This is a powerful idea that, unfortunately, is rarely taken advantage of. Whether you subscribe to the physical or logical viewpoint, HTML is not purely a physical or logical language, yet. In other words, currently used HTML elements come in both flavors: physical and logical. Elements that specify fonts, type sizes, type styles,and so on, are physical. Elements that specify content or importance, such as <CITE> and <H1>, and let the browser decide how to do things are logical. A quick look at Web pages across the Internet suggests that logical elements often go unused, because Web developers want more layout control than raw HTML provides, and style sheets are relatively new and still buggy. Furthermore, many designers just don’t think in the manner required for logical markup, and WYSIWYG page editors generally don’t encourage such thinking.

So,likeitornot,toachievethelookthattheywant,pagedesignerswillprobably continuetoabuseelements,suchas <TABLE>and<FRAME>,andusetricksto implementlayoutsinthewaythattheywantthem.Thisisthestrugglethatcurrently existsbetweenwhatpeoplewantoutofHTMLandwhatHTMLactuallyprovides.With theriseofHTML4andCascadingStyleSheets,thisstrugglemayeventuallygoaway; buttheuptakeisstillslow,andmillionsofdocumentswillcontinuetobeauthoredwith noconceptoflogicalstructuring.Webpagedevelopmentcontinuestoprovidean interestingstudyofthedifferencebetweenwhattheoristssayandwhatpeoplewant.