Thank you, for the most fun (and hardest) retrograde chess puzzle I've ever solved! A fantastic puzzle!
The answer is that
Black moved last, Ra2, and that white mates in 1 with Qb3#.
To answer the question of who moved last, and thus who is allowed to mate in 1, we must go on an adventure. First, let's answer
Which king got to its present location more recently?
If the white king got to its present location more recently, which square did it enter from? Not c5, d5, or e5, because the black king was already in the way. Not b6, d6, or c7 because the black pawn on c7 prevents those. And not b7 or d7, because the black bishops on a8 and e8 have been there since before the white king got into place. Thus, the black king got to its present location more recently.
With that in mind, we now ask
Where did the black king enter its present location from? Not b5, c5, or d5, due to the white king. Not b3, c3, or d3, due to the white pawns on b2 and c2. Thus, it must have entered from either b4 or d4. In either case, it must have been in place since the time when the c3 pawn made its capture.
Next let us figure out
What happened to white's missing pieces. White has 4 missing pieces (2 knights, the dark squared bishop, and the e pawn). Black's pawns have made 4 captures: exf7, hxg7, and the promoted light-squared bishop, which was either the original b7 pawn promoting on b1 after 2 captures, or the original b7 or d7 pawn promoting on d1 after 2 collective captures between that pair of pawns. Thus, black's pawns captured all of the missing white pieces.
Let's look more carefully at
The timing of black's promotion. Black promoted to a light-squared bishop before the kings reached their present locations, and in particular before the dxc3 capture. As a result, black could not have promoted on d1, and must have promoted on b1. As a result, we know the locations of all of black's captures: f7, g7, a2, b1.
In particular, something interesting happened to
White's dark squared bishop. The only capture location that is a dark square is f7, so white's dark squared bishop must have been captured there. This exf7 capture must have happened after the dxc3 capture, and after the kings got to their present locations.
Let's therefore examine how various pieces
Arrived to their current locations, relative to the kings reaching their places. First, how did black's dark-squared bishop get to b4. This must have happened after the exf7 capture, and after the kings were in their present location. In contrast, white's a6 bishop must've been in place since before the kings reached their current location, and some piece must've been on b5 since the time when the black king reached its spot - either the black rook or a white piece that moved away. Similarly, b7 and d7 were occupied since before the white king to its location, either by the white rooks, or by black pieces.
Now, we get to the
Queens! If they reached their current locations after the kings got to their current locations, the white queen must've come through e3 -> b6 -> a5, and the black queen must've come through a2 -> b3 -> a4. Whichever entered second would've been blocked. Thus, the queens were in place before the kings got there. In particular, a white knight must've been on b4, moved away revealing check, and had that check blocked by the black bishop, and then the white knight must've gone and been captured. This happened after the black promotion and after the exf7 capture, so that knight must've been captured in the hxg7 capture.
There's another issue:
How did the white pawn from e2 get captured, or promote to replace a captured piece? No captures happened on the e file, and the e file has never been open for promotion - the e8 bishop has been in place since before the exf7 capture. So the other black knight was captured by the e pawn, besides the one that was captured dxc3.
This puts some severe constraints on the recent past of the diagram position.
No pieces have been captured in the recent past. The most recent black capture was hxNg7, and the most recent white capture was either the dxc3 capture or the capture by the e pawn which promoted. In particular, if the last capture was hxNg7, there's not enough white waiting moves for the black rook to get all the way from h8, where it was stuck all game, behind the f8 bishop originally and the e8 bishop more recently. It would take 5 moves for the black rook to get from h8 to a2, which is one move too many, as white has only 3 waiting moves with the h pawn.
The only alternative is that
The most recent capture was by the white e pawn which promoted. This capture must've been on d8 or f8, and would've freed up a black knight both for tempo and to swap in the pinning/discovery squares (d7 and b7). The natural choice is exd8=R, where the white rook can move directly to d7 after a discovery by the black rook d7-e7, which can then get to a2 in only 3 further moves, e7-e1-a1-a2. To make this possible, the black knight must've come from the other pinning/discovery square, b7, and the other white rook must've come from b5, where it was replaced by the black rook from h8 after white's last capture.
This complicated set of maneuvers
Ends up using every single waiting move that white has available. In particular, black cannot move the knight directly from b7 to d8, as this would give double check and mate. Instead, black must move the knight around the other way, b7-c5-e6-d8, which requires a waiting move from the white h pawn when the black knight is on e6. One sequence of moves through this critical section covering the final two captures can be played over at this lichess study that I created. The h pawn must play one waiting move while the black knight maneuvers around and 2 waiting moves while the black rook gets to a2. Thus, there is not a single extra move for white available, so black must play the final move, allowing white to checkmate in 1!
To confirm the solution
I provide this full proof game in chapter 2 of the same study. Here's the PGN for the game:
1. e4 b5 2. a3 b4 3. Ra2 b3 4. Ba6 bxa2 5. Qe2 axb1=B 6. Qc4 Ba2 7. Ne2 Bb3 8. Qa4 Nc6 9. Nc3 Rb8 10. Nd5 Rb5 11. Nb4 Bb7 12. Ke2 d5 13. Kf3 Ba8 14. Kg3 Qb8 15. Re1 Qb6 16. Re3 Qa5 17. Rc3 Nd8 18. Rc5 Nb7 19. Kf3 Kd8 20. Ke3 Rb6 21. Rb5 Bc4 22. Kf4 Be2 23. Ke3 Bg4 24. Kf4 Bd7 25. Ke3 Be8 26. Kf4 Kd7 27. Ke3 Ke6 28. Kf3 Rd6 29. Ke3 Rd7 30. Kd4 Nd8 31. Kc5 Nb7+ 32. Kc6 Nf6 33. Nd3 Nh5 34. Nb4 Ng3 35. Nd3 Ne2 36. Nb4 Nc3 37. Na2 Ke5 38. Nb4 Kd4 39. dxc3+ Kc4 40. Bg5 Rg8 41. Bf6 exf6 42. Nd3+ Bb4 43. Nf4 Rh8 44. Ng6 hxg6 45. e5 Rh5 46. e6 d4 47. Rb6+ Rb5 48. e7 Nc5+ 49. Rb7 Ne6 50. h3 Nd8+ 51. exd8=R Re7+ 52. Rd7 Re1 53. h4 Ra1 54. h5 Ra2 55. Qb3#