http://tetris.wiki/api.php?action=feedcontributions&user=Chandlerswift&feedformat=atomTetrisWiki - User contributions [en]2024-03-29T13:01:33ZUser contributionsMediaWiki 1.39.3http://tetris.wiki/index.php?title=Talk:Dr._Mario&diff=21944Talk:Dr. Mario2020-10-23T05:15:42Z<p>Chandlerswift: /* Virus Generation max level */ new section</p>
<hr />
<div>Does anyone know exactly how slow the cascade speed is? --[[User:Lardarse|Lardarse]] 22:48, 20 April 2007 (EDT)<br />
:During a cascade, the playfield is scanned from bottom to top, and any piece above empty cells is moved down by one row. This process takes 16 frames, one for each row of the 8x16 cell playfield. I imagine that the process is so slow due to the limited proficiency of the developers for exploiting the NES video bandwidth. --[[User:Tepples|Tepples]] 23:09, 20 April 2007 (EDT)<br />
::So every 15 frames, because it's one frame lower than it was last scan loop? --[[User:Lardarse|Lardarse]] 13:32, 21 April 2007 (EDT)<br />
:::Correct. But I might be off by one, having not single-stepped in a while. --[[User:Tepples|Tepples]] 22:18, 21 April 2007 (EDT)<br />
<br />
== Gravity ==<br />
<br />
I drafted a possible update to the Gravity section: [[User:BaviH/Dr._Mario_Gravity]]. I wanted to get some feedback before replacing the existing Gravity section.<br />
* Is the information about specific memory addresses and CRC32 checksums acceptable or off-topic on Tetris.Wiki?<br />
* Other sections in the Dr. Mario article are prefixed with "NES version". I assume the current gravity information is NES-only as well?<br />
-- [[User:BaviH|BaviH]] ([[User talk:BaviH|talk]]) 19:13, 16 May 2020 (UTC)<br />
:ROM checksums are unnecessary, I think. We do have memory addresses on a few pages, so I think it should be okay to leave those in. Apart from that I think we can add it to the page now. As for other versions, I don't think the Game Boy version has been investigated enough, the page could use some more info on that. [[User:Arcorann|Arcorann]] ([[User talk:Arcorann|talk]]) 03:41, 20 May 2020 (UTC)<br />
<br />
== Virus Generation max level ==<br />
<br />
Possibly a question for [[User:Nightmareci]]:<br />
<br />
I'm curious about the level cap in step 1---it seems to generate sequences that look out of place compared to those I see in-game. It seems like perhaps step 7.3 of the algorithm allows for going above max_row, and due to the iterative way the algorithm runs, seems to always do that in the leftmost column/s of the (max_row+1)th row. On level 20, it seems to do this maybe half the time. Here's a few examples of what I've seen:<br />
<br />
==== ==== ==== <br />
| | | | | | <br />
+--+ +--+ +--+ +--+ +--+ +--+<br />
| | | | | |<br />
| | | | | |<br />
|ZZOO | |XOO | |Z |<br />
|ZZXOZXOO| |ZXOO XXZ| |ZZXXZZOO|<br />
|XOZXXZOO| | X Z OOZ| |XXZOXXOZ|<br />
|OX ZO XX| |OZXX ZZ | |XOOZ OXX|<br />
|ZZOO XZZ| | OXXZO| |ZZOX |<br />
|XZZ O Z| |ZX ZZ OX| |OXXOZZ O|<br />
|XX O XO| |XXOZ OOX| |OOXZ O |<br />
| OOZX Z | |XZOOXZ O| |XOZZXOOX|<br />
| ZOOXXOZ| |O XXZ XO| |X XX O|<br />
|Z XXZZ X| |ZXXZ OZX| |ZZOOZZXO|<br />
| XZZOOZX| |XZZOOZZX| | OX Z OZ|<br />
|XXO O Z| |OZZO Z| |OXZZXOOZ|<br />
|ZOX OO| |ZOOZXO | |XXZO XO|<br />
| OX ZZOX| | OXXZOX | | OOZ XX|<br />
+--------+ +--------+ +--------+<br />
<br />
I got results more in line with what I was expecting by changing the <code>17</code> in that step to <code>max_row</code>. However, I don't know enough about the algorithm to know if that change is fully correct, or if I'm just misunderstanding something in the algorithm on the page. I'm curious to see what others think.<br />
<br />
Happy to share the code that generated this, too, if that's of interest.<br />
<br />
[[User:Chandlerswift|Chandlerswift]] ([[User talk:Chandlerswift|talk]]) 05:15, 23 October 2020 (UTC)</div>Chandlerswifthttp://tetris.wiki/index.php?title=Dr._Mario&diff=21945Dr. Mario2020-10-23T04:45:38Z<p>Chandlerswift: Rephrase confusing sentence in virus placement algorithm</p>
<hr />
<div>{{infobox |title=Dr. Mario<br />
|developer=Nintendo<br />
|publisher=Nintendo<br />
|playfield=8w x 11&ndash;16h<br />
|SRS=Dr. M domino system<br />
|hard=no<br />
|hold=no<br />
|preview=1<br />
|released=1990 (NES/GB)<br />
|platform=NES, Arcade, Game Boy, Super NES, N64, GameCube (Japan only), GBA, Wii<br />
|title-scrn=DrMNES-title.png<br />
|ingame-scrn=DrMNES-play.png<br />
}}<br />
<br />
'''''Dr. Mario''''' is a non-tetromino puzzle game franchise developed by Nintendo and released on its systems.<br />
<br />
The [[playfield|bottle]] is 8 blocks wide by 11 to 16 blocks high (depending on version) and starts out partially full of "viruses", or fixed blocks of the color red, yellow, or blue.<br />
<br />
[[Piece]]s in ''Dr. Mario'' are vitamin pills with two halves (making them dominoes), with each half colored red, yellow, or blue.<br />
The player can move or rotate them as they fall into the bottom.<br />
Once a pill locks, if four or more blocks of a color are aligned horizontally or vertically, they are removed, and the pill segments above them (but not viruses) fall in a [[Line clear#Cascade|cascade]].<br />
In 2-player, cascades cause garbage pill segments to drop into the opponent's playfield.<br />
Anything that falls falls slowly, at a rate of 4 rows per second, due to the design of the playfield refresh logic. Modern versions allow players to speed up the fall rate of these cascades in single-player, but not in multiplayer, where the time lost waiting for garbage segments to fall is often more damaging than the segments themselves.<br />
<br />
Players who like ''Dr. Mario'' may also like ''[[Columns]]'', ''[[Klax]]'', and ''[[Puyo Pop]]''.<br />
The game ''[[Tetris 2]]'' can be thought of as ''Dr. Mario'' with tetrominoes.<br />
<br />
== Rotation system ==<br />
<br />
Ordinarily, the pills rotate within a 2x2 box whose bottom left corner is always filled.<br />
Clockwise rotation looks like this:<br />
{|<br />
|-valign="top"<br />
|<playfield><br />
G........G<br />
G........G<br />
G...ZJ...G<br />
G........G<br />
</playfield><br />
|<playfield><br />
G........G<br />
G...Z....G<br />
G...J....G<br />
G........G<br />
</playfield><br />
|<playfield><br />
G........G<br />
G........G<br />
G...JZ...G<br />
G........G<br />
</playfield><br />
|<playfield><br />
G........G<br />
G...J....G<br />
G...Z....G<br />
G........G<br />
</playfield><br />
|}<br />
<br />
Wall kicks on ''Dr. Mario'' (NES), ''WarioWare Inc.: Mega Microgame$'' (GBA), and ''Dr. Mario & Puzzle League'' (GBA) are as follows:<br />
<br />
Horizontal to vertical:<br />
{|<br />
|-valign="top"<br />
|<playfield><br />
G........G<br />
G........G<br />
G...ZJ...G<br />
G........G<br />
</playfield><br />
|<playfield><br />
G........G<br />
G...Z....G<br />
G...J....G<br />
G........G<br />
</playfield><br />
|-valign="top"<br />
|<playfield><br />
G........G<br />
G...G....G<br />
G...ZJ...G<br />
G........G<br />
</playfield><br />
|<playfield><br />
G........G<br />
G...G....G<br />
G...ZJ...G<br />
G........G<br />
</playfield><br />
No kick here<br />
|}<br />
<br />
Vertical to horizontal:<br />
{|<br />
|-valign="top"<br />
|<playfield><br />
G........G<br />
G...Z....G<br />
G...J....G<br />
G........G<br />
</playfield><br />
|<playfield><br />
G........G<br />
G........G<br />
G...ZJ...G<br />
G........G<br />
</playfield><br />
|-valign="top"<br />
|<playfield><br />
G........G<br />
G...Z....G<br />
G...JG...G<br />
G........G<br />
</playfield><br />
|<playfield><br />
G........G<br />
G........G<br />
G..ZJG...G<br />
G........G<br />
</playfield><br />
Kick left<br />
|-valign="top"<br />
|<playfield><br />
G........G<br />
G...Z....G<br />
G..GJG...G<br />
G........G<br />
</playfield><br />
|<playfield><br />
G........G<br />
G...Z....G<br />
G..GJG...G<br />
G........G<br />
</playfield><br />
No kick here<br />
|}<br />
<br />
''Tetris & Dr. Mario'' has some additional wall kicks from horizontal to vertical:<br />
{|<br />
|-valign="top"<br />
|<playfield><br />
G........G<br />
G...G....G<br />
G...ZJ...G<br />
G........G<br />
</playfield><br />
|<playfield><br />
G........G<br />
G...GZ...G<br />
G....J...G<br />
G........G<br />
</playfield><br />
Kick right<br />
|-valign="top"<br />
|<playfield><br />
G........G<br />
G...GG...G<br />
G...ZJ...G<br />
G........G<br />
</playfield><br />
|<playfield><br />
G........G<br />
G...GG...G<br />
G...Z....G<br />
G...J....G<br />
</playfield><br />
Kick down<br />
|-valign="top"<br />
|<playfield><br />
G........G<br />
G...GG...G<br />
G...ZJ...G<br />
G...G....G<br />
</playfield><br />
|<playfield><br />
G........G<br />
G...GG...G<br />
G....Z...G<br />
G...GJ...G<br />
</playfield><br />
Kick down+right<br />
|-valign="top"<br />
|<playfield><br />
G........G<br />
G...GG...G<br />
G...ZJ...G<br />
G...GG...G<br />
</playfield><br />
|<playfield><br />
G........G<br />
G...GG...G<br />
G...ZJ...G<br />
G...GG...G<br />
</playfield><br />
Fail<br />
|}<br />
<br />
== Capsule Generation ==<br />
=== NES Version ===<br />
A sequence of length 128 is generated before a game starts, with each element of the sequence an integer uniformly distributed in range [0,8], with the integer being used to select from all nine possible color pairs for a capsule. The 128-long sequence loops, so once the 129th capsule is generated, it's the same as the first, and 130th the same as the second, and so on.<br />
<br />
== Virus Generation ==<br />
=== NES Version ===<br />
{| class="wikitable"<br />
|-<br />
! Virus Level<br />
| 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19<br />
|-<br />
!Maximum Row<br />
| 10 || 10 || 10 || 10 || 10 || 10 || 10 || 10 || 10 || 10 || 10 || 10 || 10 || 10 || 10 || 11 || 11 || 12 || 12 || 13<br />
|}<br />
For virus levels 20 and up, use virus level 19's maximum row value.<br />
<br />
<br />
{| class="wikitable"<br />
|-<br />
! PRNG Output<br />
| 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10 || 11 || 12 || 13 || 14 || 15<br />
|-<br />
! Virus Type<br />
| Yellow || Red || Blue || Blue || Red || Yellow || Yellow || Red || Blue || Blue || Red || Yellow || Yellow || Red || Blue || Red<br />
|}<br />
<br />
<br />
The algorithm described here takes as inputs the current bottle virus contents, selected virus level, and the number of remaining viruses to generate. It's called repeatedly until the remaining viruses to generate returned is zero:<br />
# Generate a random number in range [1,16].<br />
# If the random number in step 1 is greater than the maximum allowed row (seed the "Virus Level"/"Maximum Row" table above), go back to step 1.<br />
# Generate a random number in range [1,8] and use for the candidate virus X coordinate, with 1 on the left and 8 on the right.<br />
# Use the number generated in step 1 as the candidate virus Y coordinate, with 1 on the bottom and 16 the top.<br />
# Using the number of remaining viruses as the numerator, take the remainder of division by 4.<br />
# Using the remainder calculated in step 5, set the currently selected virus color: Yellow if 0, Red if 1, and Blue if 2. Otherwise,if the remainder was 3, do the following:<br />
## Randomly generate an integer in range [0,15].<br />
## Select from the "PRNG Output" table above the virus color matching the integer generated in step 6.1.<br />
# Do repeatedly the following while the current candidate virus position is filled:<br />
## Increment the candidate virus X position.<br />
## If the candidate virus X position is now 9:<br />
### Set the candidate virus X position to 1 and increment the candidate virus Y position<br />
## If the candidate virus Y position is now 17:<br />
### Return the number of remaining viruses to generate.<br />
# Check in all four cardinal directions 2 cells away from the candidate virus position the virus contents of the bottle.<br />
# If all three colors are present in the four checked cells, go back to step 7.1 (don't do step 7).<br />
# If the four checked cells in step 8 lacks the currently selected virus color, go to step 13.<br />
# If the currently selected virus type is yellow, change the currently selected virus color to blue; if the currently selected virus type is red, change the currently selected virus color to yellow; if the currently selected virus color is blue, change the currently selected virus color to red.<br />
# Go to step 8.<br />
# Set the candidate virus position in the bottle to the currently selected virus color.<br />
# Return the number of remaining viruses less one.<br />
<br />
== Gravity ==<br />
=== NES Version ===<br />
<br />
When the 10th (20th, 30th, and so on) vitamin capsule appears in Dr. Mario's throwing hand, a sound effect plays and the drop speed of the vitamin capsules increases slightly. This speed up can happen up to a maximum of 49 times in a level, meaning there are a total of 50 possible drop speeds for each SPEED setting (LOW, MED, or HI).<br />
<br />
Here are technical details for the NTSC game <!--(PRG+CHR CRC32 198C2F41)--> and the PAL game<!--(PRG+CHR CRC32 9735D267)-->:<br />
<br />
* A gravity table begins at memory address A795 in the NTSC game and memory address A79E in the PAL game. It consists of 81 one-byte entries (indexes decimal 0 to 80). The actual values in the memory addresses are zero-based: a value of 0 has an effect of 1 frame per row. The gravity table below shows the one-based "frames per row" values.<br />
<br />
* A three-byte table of the starting indexes for each SPEED setting exists at memory address A38D in the NTSC game and memory address A396 in the PAL game. The contents are the same in both versions:<br />
:{| class="wikitable"<br />
|-<br />
! LOW<br />
| 15<br />
|-<br />
! MED<br />
| 25<br />
|-<br />
! HI<br />
| 31<br />
|}<br />
<br />
* A count of the number of times a speed up has occurred this level exists at memory address 8A (as well as having other copies at addresses A0, 30A, and 320).<br />
<br />
* The starting index is added to the number of speed ups, and the result is used as an index into the the gravity table.<br />
<br />
Here is the gravity table:<br />
<div style="overflow: auto;"><br />
{|class="wikitable" style="margin-bottom:0;"<br />
|-<br />
!Index<br />
!0<br />
!1<br />
!2<br />
!3<br />
!4<br />
!5<br />
!6<br />
!7<br />
!8<br />
!9<br />
!10<br />
!11<br />
!12<br />
!13<br />
!14<br />
!15<br />
!16<br />
!17<br />
!18<br />
!19<br />
!20<br />
!21<br />
!22<br />
!23<br />
!24<br />
!25<br />
!26<br />
!27<br />
!28<br />
!29<br />
!30<br />
!31<br />
!32<br />
!33<br />
!34<br />
!35<br />
!36<br />
!37<br />
!38<br />
!39<br />
!40<br />
!41<br />
!42<br />
!43<br />
!44<br />
!45<br />
!46<br />
!47<br />
!48<br />
!49<br />
!50<br />
!51<br />
!52<br />
!53<br />
!54<br />
!55<br />
!56<br />
!57<br />
!58<br />
!59<br />
!60<br />
!61<br />
!62<br />
!63<br />
!64<br />
!65<br />
!66<br />
!67<br />
!68<br />
!69<br />
!70<br />
!71<br />
!72<br />
!73<br />
!74<br />
!75<br />
!76<br />
!77<br />
!78<br />
!79<br />
!80<br />
|-<br />
!style="white-space: nowrap;"|NTSC frames per row<br />
|70<br />
|68<br />
|66<br />
|64<br />
|62<br />
|60<br />
|58<br />
|56<br />
|54<br />
|52<br />
|50<br />
|48<br />
|46<br />
|44<br />
|42<br />
|40<br />
|38<br />
|36<br />
|34<br />
|32<br />
|30<br />
|28<br />
|26<br />
|24<br />
|22<br />
|20<br />
|19<br />
|18<br />
|17<br />
|16<br />
|15<br />
|14<br />
|13<br />
|12<br />
|11<br />
|10<br />
|10<br />
|9<br />
|9<br />
|8<br />
|8<br />
|7<br />
|7<br />
|6<br />
|6<br />
|6<br />
|6<br />
|6<br />
|6<br />
|6<br />
|6<br />
|6<br />
|6<br />
|6<br />
|6<br />
|5<br />
|5<br />
|5<br />
|5<br />
|5<br />
|4<br />
|4<br />
|4<br />
|4<br />
|4<br />
|3<br />
|3<br />
|3<br />
|3<br />
|3<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|1<br />
|-<br />
!PAL frames per row<br />
|57<br />
|55<br />
|54<br />
|52<br />
|50<br />
|49<br />
|47<br />
|45<br />
|44<br />
|42<br />
|40<br />
|39<br />
|37<br />
|35<br />
|34<br />
|32<br />
|30<br />
|29<br />
|27<br />
|25<br />
|24<br />
|22<br />
|20<br />
|19<br />
|17<br />
|16<br />
|15<br />
|14<br />
|13<br />
|12<br />
|11<br />
|10<br />
|10<br />
|9<br />
|8<br />
|7<br />
|7<br />
|6<br />
|6<br />
|6<br />
|5<br />
|5<br />
|5<br />
|5<br />
|4<br />
|4<br />
|4<br />
|4<br />
|4<br />
|4<br />
|3<br />
|3<br />
|3<br />
|3<br />
|3<br />
|3<br />
|3<br />
|3<br />
|3<br />
|3<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|2<br />
|1<br />
|-<br />
!rowspan="3"|Ranges<br />
|colspan="15" style="border:none;"|<br />
|colspan="50" style="background:#DDFFDD;"|LOW: indexes 15 to 64<br />
|-<br />
|colspan="25" style="border:none;"|<br />
|colspan="50" style="background:#FFFFDD;"|MED: indexes 25 to 74<br />
|-<br />
|colspan="31" style="border:none;"|<br />
|colspan="50" style="background:#FFDDDD;"|HI: indexes 31 to 80<br />
|}<br />
</div><br />
<br />
{{Nintendo games}}<br />
<br />
[[Category:Non-tetromino games]]</div>Chandlerswift